Lists the available BSP (<strong>B</strong>oard <strong>S</strong>upport <strong>P</strong>ackage) APIs.
Modules | |
nm_bsp_init | |
Initialize BSP. | |
nm_bsp_deinit | |
De-initialization for bsp (\e Board \e Support \e Package) | |
nm_bsp_reset | |
Reinitialization for bsp (Board Support Package) by resetting NMC1500 SoC by setting CHIP_EN and RESET_N signals low, CHIP_EN high then RESET_N high. | |
nm_bsp_sleep | |
Sleep in units of milliseconds. | |
nm_bsp_register_isr | |
Register ISR (Interrupt Service Routine) in the initialization of HIF (Host Interface) Layer. | |
nm_bsp_interrupt_ctrl | |
Synchrnonous enable/disable interrupts fucntion. | |
nm_bsp_malloc | |
Synchrnonous memory allocate API. | |
nm_bsp_free | |
Synchrnonous memory free API. | |
Functions | |
sint8 | nm_bsp_deinit (void) |
De-iInitialize BSP. More... | |
sint8 | nm_bsp_init (void) |
Initialization for bsp (Board Support Package) such as Reset and Chip Enable Pins for WILC, delays, register ISR, enable/disable IRQ for WILC, ...etc. You must use this function in the head of your application to enable WILC and Host Driver communicate each other. More... | |
void | nm_bsp_interrupt_ctrl (uint8 u8Enable) |
Enable/Disable interrupts. More... | |
void | nm_bsp_register_isr (tpfNmBspIsr pfIsr) |
Register the host interface interrupt service routine. More... | |
void | nm_bsp_reset (void) |
Reset NMC1500 SoC by setting CHIP_EN and RESET_N signals low, CHIP_EN high then RESET_N high. More... | |
void | nm_bsp_sleep (uint32 u32TimeMsec) |
Used to put the host to sleep for the specified duration (in milliseconds). Forcing the host to sleep for extended period may lead to host not being able to respond to WINC board events. It is important to be considerate while choosing the sleep period. More... | |
sint8 nm_bsp_deinit | ( | void | ) |
De-iInitialize BSP.
This function is used to de-initialize the BSP and turn off the WINC board.
The nm_bsp_deinit is the last function that should be called after the application has finished and before the WINC is switched off. A call to this function will turn off the WINC board by setting CHIP_EN and RESET_N signals low. Every function call of nm_bsp_init should be matched with a call to nm_bsp_deinit. Failure to do so may result in the WINC consuming higher power than expected, since it won't be properly de-initialized.
References M2M_SUCCESS, and pio_set_pin_low().
sint8 nm_bsp_init | ( | void | ) |
Initialization for bsp (Board Support Package) such as Reset and Chip Enable Pins for WILC, delays, register ISR, enable/disable IRQ for WILC, ...etc.
You must use this function in the head of your application to enable WILC and Host Driver communicate each other.
This function is used to initialize the Board Support Package (BSP) in order to prepare the WINC before any WINC API calls.
Initialize BSP.
The nm_bsp_init function is the first function that should be called at the beginning of every application to initialize the BSP and the WINC board. Otherwise, the rest of the BSP function calls will return with failure. This function should also be called after the WINC has been switched off with a successful call to nm_bsp_deinit in order to reinitialize the BSP before the Application can use any of the WINC APIs again. After the function initializes the WINC, a hard reset must be applied to start the WINC board by calling nm_bsp_reset.
References delay_init, gpfIsr, init_chip_pins(), nm_bsp_reset(), and NULL.
Referenced by main(), os_m2m_wifi_init_imp(), and serial_bridge().
void nm_bsp_interrupt_ctrl | ( | uint8 | u8Enable | ) |
Enable/Disable interrupts.
Enable/Disable interrupts from the WINC.
[in] | u8Enable | '0' disable interrupts. '1' enable interrupts |
This function can be used to enable/disable the WINC to host interrupts, depending on how the driver is implemented. It is an internal driver function and shouldn't be called by the application.
[in] | u8Enable |
|
References pio_disable_interrupt(), pio_enable_interrupt(), and pio_get_interrupt_status().
Referenced by hif_handle_isr(), hif_isr(), hif_set_rx_done(), and isr().
void nm_bsp_register_isr | ( | tpfNmBspIsr | pfIsr | ) |
Register the host interface interrupt service routine.
[in] | pfIsr | Pointer to ISR handler in HIF |
The WINC board uses the SPI interface to communicate with the host. This function registers the SPI interrupt to notify the host whenever there is an outstanding message from the WINC board. This function should be called during the initialization of the host interface. It is an internal driver function and shouldn't be called by the Application.
[in] | pfIsr | Pointer to ISR handler in the HIF layer. |
References chip_isr(), gpfIsr, pio_configure_pin(), pio_enable_interrupt(), pio_get_interrupt_status(), PIO_IT_LOW_LEVEL, pio_pull_up(), PIO_PULLUP, PIO_TYPE_PIO_INPUT, and sysclk_enable_peripheral_clock().
Referenced by hif_init().
void nm_bsp_reset | ( | void | ) |
Reset NMC1500 SoC by setting CHIP_EN and RESET_N signals low, CHIP_EN high then RESET_N high.
Performs a hardware reset to the WINC board.
[in] | None |
The nm_bsp_reset is used to perform a hard reset on the WINC board by setting CHIP_EN and RESET_N signals low, then after an appropriate delay this function puts CHIP_EN high then RESET_N high, for more details on the timing between signals please check the WINC data-sheet. After a successful call, the WINC board firmware will kick off to load and start the WINC firmware. This function should be called to reset the WINC firmware after the BSP is initialized and before the start of any communication with WINC board. Calling this function at any other time will result in losing the state and connections saved in the WINC board and starting again from the initial state. The host driver will need to be de-initialized before calling nm_bsp_reset and initialized again, which can be achieved by use of m2m_wifi_init and m2m_wifi_deinit.
References nm_bsp_sleep(), pio_set_pin_high(), and pio_set_pin_low().
Referenced by nm_bsp_init(), and nm_bus_init().
void nm_bsp_sleep | ( | uint32 | u32TimeMsec | ) |
Used to put the host to sleep for the specified duration (in milliseconds). Forcing the host to sleep for extended period may lead to host not being able to respond to WINC board events. It is important to be considerate while choosing the sleep period.
[in] | u32TimeMsec | Time unit in milliseconds |
[in] | u32TimeMsec | Time unit in milliseconds. |
References delay_ms.
Referenced by app_ble_wifi_provisioning(), app_main(), chip_reset(), chip_wake(), cpu_start(), enable_disable_ap_mode(), enable_rf_blocks(), hif_deinit(), hif_send(), load_efuse_to_regs(), main(), nm_bsp_reset(), nm_bus_init(), nm_drv_init_hold(), socket_cb(), wait_for_bootrom(), wait_for_firmware_start(), write_to_efuse(), and WriteRootCertificate().