5.1 Configuring Board Support Package
Perform the following changes in the Board Support Package (BSP).
- Recreate the bsp files
nm_bsp_samd21.h
andnm_bsp_samd21.c
. - Rename the file
nm_bsp_sam21.h
tonm_bsp_xyz.h
, wherexyz
= the third party MCU.- Modify the debug pre-processing macro based on the MCU.
- Include the newly created
file
nm_bsp_xvy.h
innm_bsp_internal.h
.
- Rename the file
nm_bsp_samd21.c
tonm_bsp_xyz.c
, wherexyz
= the third party MCU. - Modify the following set of functions
based on the third party MCU BSP.
nm_bsp_init
– This function is used to initialize the BSP to prepare the ATWINC before it starts working.nm_bsp_deinit
– This function is used to de-initialize the BSP.nm_bsp_reset
– This function is used to reset the ATWINC board by setting the CHIP_EN and RESET_N signals low, and, after a specific delay, the function sets CHIP_EN high, then sets RESET_N high.nm_bsp_sleep
– This function is used to set the host to sleep for the specified duration.nm_bsp_register_isr
– This function is used to register the host interface interrupt service routine.nm_bsp_interrupt_ctrl
– This function is used to enable/disable the interrupt.