Delta / NNN50_WIFI_API

Dependents:   NNN50_CE_Test_UDP NNN50_linux_firmware NNN50_SoftAP_HelloWorld NNN50_BLEWIFISensor ... more

Embed: (wiki syntax)

« Back to documentation index

spi_flash_read

spi_flash_read
[Function]

Functions

sint8 spi_flash_read (uint8 *pu8Buf, uint32 u32Addr, uint32 u32Sz)
 Read a specified portion of data from SPI Flash.
.

Function Documentation

sint8 spi_flash_read ( uint8 pu8Buf,
uint32  u32Addr,
uint32  u32Sz 
)

Read a specified portion of data from SPI Flash.
.

Parameters:
[out]pu8BufPointer to data buffer which will fill in with data in case of successful operation.
[in]u32AddrAddress (Offset) to read from at the SPI flash.
[in]u32SzTotal size of data to be read in bytes
Warning:
  • Address (offset) plus size of data must not exceed flash size.
  • No firmware is required for reading from SPI flash.
  • In case of there is a running firmware, it is required to pause your firmware first before any trial to access SPI flash to avoid any racing between host and running firmware on bus using m2m_wifi_download_mode
Note:
  • It is blocking function
See also:
m2m_wifi_download_mode, spi_flash_get_size
Returns:
The function returns M2M_SUCCESS for successful operations and a negative value otherwise.