4.2 Adding ATWINC15x0 Driver

Perform the following steps to add the ATWINC15x0 driver in ASF.
Note: It is recommended to use the latest ASF3 ATWINC15x0 driver for porting.
  1. Open the Atmel Studio.
  2. Open the basic reference application from File > New > Example Project.
  3. Select “WINC1500 AP Scan Example-SAMD21 Xplained Pro”.
  4. Navigate to “<Root_folder_path>\WINC1500_AP_SCAN_EXAMPLE7\WINC1500_AP_SCAN_EXAMPLE7\src\ASF\common\components\wifi”.
  5. Copy the “winc1500” folder to the “<MLA root_path>\apps\tcpip\wifi_PIC24F_WINC15x0\wifi_PIC24F_WINC15x0.X” MLA development environment.

    The folder structure of the ATWINC15x0 driver displays in the following image.

    Figure 4-6. Folder Structure of WINC15x0 Driver
  6. Modify the nm_bus_wrapper_samd21.c , nm_bsp_samd21.c and nm_bsp_samd21.h files (marked in red) for porting the ATWINC15x0 driver to PIC24 MCU.
    Figure 4-7. Folders to be Modified
  7. Rename the PIC24 host files (nm_bus_wrapper_PIC24.c, nm_bsp_PIC24.C and nm_bsp_PIC24.h), as shown in the following image.
    Figure 4-8. Renamed Files
  8. Comment the following code in the "wifi_PIC24F_WINC15x0\wifi_PIC24F_WINC15x0.X\winc1500\socket\include\m2m_socket_host_if.h" file.
    //typedef sint8			SOCKET;