3.1.8 Project Setup - ATA8510/15 MCC H3 Library Configuration
- Open the MPLAB Code Configurator from
Tools>Embedded>MPLAB Code Configurator open/close
Figure 3-14. Project Setup: MCC - Add ATA851X from Device
Resources>Libraries>Wireless>System Services>ATA851X as illustrated
below.
Figure 3-15. System Services - Add SERCOM from Device Resources>Peripherals to interface ATA8510/15 with Host over SPI. User can select either SPI/SERCOM/PLIB/FLEXCOM based on the MCU host from Microchip.
- From the configuration options, select the pins used for Chip Select, NRESET and
NPWRON1 as illustrated in the following figure
Figure 3-16. ATA851X Configuration Options - Add all auto-activated components based on the application needs. In this
application,the FreeRTOS is not activated as this is a bare-metal project.
Select the required services and configurations under respective services.
Figure 3-17. Components Auto-Activation -
SERCOM Information
-
SERCOM0 is utilized for host and ATA8510/15 SPI command communications.
Note: If the user is using different SERCOM than the one preconfigured in the system services, then user must make the necessary adjustments to the SERCOM settings and update the pin configuration accordingly.Figure 3-18. SERCOM Selection
-
- Open the Pin Configuration
from Plugins dropdown>Pin Configuration as illustrated below.
Configure the pins used for SPI communication, NRESET and NPWRON.
Figure 3-19. Pin Configuration Figure 3-20. Pin Configuration - Click on Generate as
illustrated below to generate the code
Figure 3-21. Code Generation