5.1 Configuring Board Support Package

Perform the following changes in the Board Support Package (BSP).

  1. Recreate the bsp files nm_bsp_samd21.h and nm_bsp_samd21.c.
  2. Rename the file nm_bsp_sam21.h to nm_bsp_xyz.h, where xyz = the third party MCU.
    • Modify the debug pre-processing macro based on the MCU.
    • Include the newly created file nm_bsp_xvy.h in nm_bsp_internal.h.
  3. Rename the file nm_bsp_samd21.c to nm_bsp_xyz.c, where xyz = the third party MCU.
  4. 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.