3.1 PIC32CZ CA90 Curiosity Ultra Development Board
To add and configure MPLAB Harmony components using MCC, follow these steps:
- In the MCC window, under Device Resources, click and expand the list of options Harmony > Peripherals > SERCOM.
- Click SERCOM2 and observe that
the SERCOM2 Peripheral Library block is added in the Project Graph section.
Figure 3-1. SERCOM Module - Click SERCOM2 and in the
Configuration Options property page, click and expand SERCOM2 and
configure SERCOM2 module as SPI Master as shown below.
Figure 3-2. SERCOM2 Configuration - From the Plugins drop-down list, select Pin Configuration.
Figure 3-3. Plugins - Pin Configuration - Click Pin Settings and then
sort entries by selecting Ports from the Order list.
Figure 3-4. Selecting Ports from the Order Menu - Configure the pins as shown below:
Figure 3-5. Configuration of Pins - In the Plugins drop-down list,
select DMA Configuration.
Figure 3-6. Plugins - DMA Configuration - In the DMA Configuration, click
Add Channel to add DMAC Channel 0 and choose the trigger as
SERCOM2_Transmit. Repeat the same steps, but for DMAC Channel 1 choose
SERCOM2_Receive as the trigger.
Figure 3-7. DMA Configuration - Click Generate to generate the
code.
Figure 3-8. Generating the Code