42 #ifdef CONF_WINC_USE_SPI 63 if(pu16FwHifInfo !=
NULL)
65 *pu16FwHifInfo = (
uint16)reg;
69 *pu16OtaHifInfo = (
uint16)(reg>>16);
91 M2M_INFO(
"Fw HIF: %04x\n", fw_hif_info);
102 reg = strgp.u32Firmware_Ota_rev;
110 M2M_INFO(
"Firmware ver : %u.%u.%u \n", pstrRev->u8FirmwareMajor, pstrRev->u8FirmwareMinor, pstrRev->u8FirmwarePatch);
111 M2M_INFO(
"Firmware Build %s Time %s\n", pstrRev->BuildDate, pstrRev->BuildTime);
114 if(fw_hif_info != pstrRev->u16FirmwareHifInfo)
117 M2M_ERR(
"Inconsistent Firmware Version\n");
139 M2M_ERR(
"Unknown Firmware Version\n");
161 M2M_INFO(
"Ota HIF: %04x\n", ota_hif_info);
172 reg = strgp.u32Firmware_Ota_rev;
180 M2M_INFO(
"OTA ver : %u.%u.%u \n", pstrRev->u8FirmwareMajor, pstrRev->u8FirmwareMinor, pstrRev->u8FirmwarePatch);
181 M2M_INFO(
"OTA Build %s Time %s\n", pstrRev->BuildDate, pstrRev->BuildTime);
184 if(ota_hif_info != pstrRev->u16FirmwareHifInfo)
187 M2M_ERR(
"Inconsistent OTA Version\n");
230 M2M_ERR(
"[nmi start]: fail init bus\n");
235 #ifdef CONF_WINC_USE_SPI 255 M2M_ERR(
"[nmi start]: fail init bus\n");
266 M2M_ERR(
"[nmi start]: fail chip_wakeup\n");
277 #ifdef CONF_WINC_USE_SPI 328 M2M_ERR(
"failed to enable interrupts..\n");
335 #ifdef CONF_WINC_USE_SPI 376 M2M_ERR(
"[nmi stop]: chip_deinit fail\n");
382 M2M_ERR(
"[nmi stop]: fail init bus\n");
385 #ifdef CONF_WINC_USE_SPI sint8 enable_interrupts(void)
sint8 nm_drv_init_download_mode(uint32 req_serial_number)
sint8 nm_drv_init_hold(uint32 req_serial_number)
sint8 nm_get_firmware_full_info(tstrM2mRev *pstrRev)
Get Firmware version info.
sint8 nm_read_block(uint32 u32Addr, uint8 *puBuf, uint32 u32Sz)
This module contains common APIs declarations.
sint8 nm_get_hif_info(uint16 *pu16FwHifInfo, uint16 *pu16OtaHifInfo)
Get Hif info of images in both partitions (Firmware and Ota).
#define M2M_HIF_BLOCK_VALUE
signed char sint8
Range of values between -128 to 127.
#define M2M_GET_HIF_MINOR(hif_info)
sint8 nm_read_reg_with_ret(uint32 u32Addr, uint32 *pu32RetVal)
This module contains WINC3400 M2M driver APIs declarations.
#define M2M_GET_HIF_MAJOR(hif_info)
WINC3400 IoT Application Interface Internal Types.
sint8 nm_bus_iface_deinit(void)
Deinitialize bus interface.
unsigned short uint16
Range of values between 0 to 65535.
sint8 wait_for_bootrom(uint8 arg)
This module contains WINC3400 ASIC specific internal APIs.
void nm_bsp_sleep(uint32 u32TimeMsec)
sint8 nm_get_ota_firmware_info(tstrM2mRev *pstrRev)
Get Firmware version info.
NMI_API void m2m_memset(uint8 *pBuf, uint8 val, uint32 sz)
Set specified number of data bytes in specified data buffer to specified value.
sint8 nm_write_reg(uint32 u32Addr, uint32 u32Val)
sint8 nm_cpu_start(void)
Start CPU from the WINC module.
sint8 nm_spi_init(void)
Initialize the SPI.
sint8 wait_for_firmware_start(uint8 arg)
uint32 nmi_get_chipid(void)
This module contains WINC3400 bus APIs implementation.
sint8 nm_drv_deinit(void *arg)
sint8 nm_drv_init(void *arg, uint32 req_serial_number)
unsigned long uint32
Range of values between 0 to 4294967295.
sint8 nm_drv_init_start(void *arg)
This module contains WINC3400 BSP APIs declarations.
unsigned char uint8
Range of values between 0 to 255.
This module contains WINC3400 SPI protocol bus APIs implementation.
sint8 nm_spi_deinit(void)
DeInitialize the SPI.
#define M2M_GET_HIF_BLOCK(hif_info)
Structure holding firmware version parameters and build date/time.
sint8 nm_bus_iface_init(uint8 *pvInitVal, uint32 req_serial_number)