Rapid Prototyping With 32-bit MCU-based Curiosity Nano Evaluation Kit using MPLAB Harmony v3 Software Framework: Step 3
Configure SPI Peripheral Library and SPI Pins
Under the Available Components tab, expand Peripherals > SERCOM.
Double-click on SERCOM1 to add the SERCOM instance 1 to the project.
Select the SERCOM 1 Peripheral Library and configure it for the SPI Master protocol. Next, perform the following SPI configurations:
Open the Pin Configuration tab by clicking MHC > Tools > Pin Configuration.
Select the MHC Pin Settings tab and sort the entries by Ports names.
The mikroBUS™ socket #1 design schematics for the PIC32CM MC00 Curiosity Nano Evaluation Kit and the Curiosity Nano Base Board are shown in Figure 5.
- Configure SPI MISO on PA16 (Pin #17)
- Configure SPI clock (SCK) on PA17 (Pin #18)
- Set Custom Name as "CLICK_EINK_BUNDLE_CS" (SPI Chip Select (CS)) on PA18 (Pin #19), Direction as Out, and Latch as High.
- Configure SPI MOSI on PA19 (Pin #20)
The eINK Click bundle needs three additional pins for configuration and data exchange.
Configure these PORT pins needed by the eINK Click bundle in the MHC Pin Configurator as shown in Figure 7.
- Set Custom Name as "CLICK_EINK_BUNDLE_DC", Direction as Out, and Latch as High on PA05 (Pin #6)
- Set Custom Name as "CLICK_EINK_BUNDLE_BSY" and Direction as In on PA10 (Pin #13)
- Set Custom Name as "CLICK_EINK_BUNDLE_RST", Direction as Out, and Latch as High on PA11 (Pin #14)
Configure SysTick
Click on System in the project graph. Expand Cortex-M0+ Configuration > SysTick > Enable SysTick from the Configuration Options tab, and check the box next to Enable SysTick and Enable Interrupt.