2.5 Adding Harmony Modules to Project
- Go to MCC Project Graph window, as opened in previous step
Figure . MCC Project Graph - Add BSP Component. On Device Resources, navigate to Board Support Packages (BSPs) and click on + sign next to PIC32CXMTG Evaluation Kit BSP
Figure . Add BSP Component Add Core Component
- On Device Resources, navigate to Core and click on + sign next to Core
Figure . Add Core Component - Click No when prompted for adding FreeRTOS component. This example is a Baremetal project
Figure . Do Not Add FreeRTOS
Add Time Component
- On Device Resources, navigate to System Services and click on + sign next to Time
Figure . Add Time Component - Right-Click on TMR dependency and select Satisfiers → TC0 (tc0)
Figure . Select TC0 - Click on TC0 component, on Configuration Options set Clock Source to MCK0/128 on Channel 0 so configuration matches the following:
Figure . Configure TC0
- Add TRNG Component. On Device Resources, navigate to Peripherals and click on + sign next to TRNG
Figure . Add TRNG Component Add G3 MAC RT Component
- On Device Resources, navigate to SmartEnergy → Drivers and click on + sign next to G3 MAC RT
Figure . Add G3 MAC RT Component - Right-Click on SPI dependency and select Satisfiers → FLEXCOM5 (flexcom5)
Figure . Select Flexcom5 - FLEXCOM5 component is auto-configured when connected to G3 MAC RT component, as seen on the figure:
Figure . FLEXCOM5 Autoconfigured - Click on G3 MAC RT component, on Configuration Options set Pins and PLC Coupling so configuration matches the following:
Figure . Configure G3 MAC RT - Right-Click on PCOUP dependency and select Satisfiers → PLC PHY Coupling (srv_pcoup)
Figure . Select PHY Coupling
Add PLC PVDD Monitor Component
- On Device Resources, navigate to SmartEnergy → Services and click on + sign next to PLC PVDD Monitor
Figure . Add PLC PVDD Monitor Component - Right-Click on ADC dependency and select Satisfiers → ADC (adc)
Figure . Select ADC - Click on ADC component, on Configuration Options set Prescaler and Channel 4 Options so configuration matches the following:
Figure . Configure ADC - Click on PLC PVDD Monitor component, on Configuration Options set Channel 4 so configuration matches the following:
Figure . Configure PVDD Monitor
Add RF215 Component
- On Device Resources, navigate to SmartEnergy → Drivers and click on + sign next to RF215
Figure . Add RF215 Component - Right-Click on SPI dependency and select Satisfiers → FLEXCOM3 (flexcom3)
Figure . Select Flexcom3 FLEXCOM3 component is auto-configured when connected to RF215 component.
- Click on RF215 component, on Configuration Options set Pins so configuration matches the following:
Figure . Configure RF215
Add Crypto Library
- On Device Resources, navigate to Libraries and click on + sign next to Cryptographic (Crypto) Library
Figure . Add Crypto Library - Right-Click on LIB_WOLFCRYPT dependency and select Satisfiers → wolfCrypt Library (lib_wolfcrypt)
Figure . Select WolfCrypt - Click on Cryptographic (Crypto) Library component, on Configuration Options enable Security options required by G3, as seen on the figure:
Figure . Configure Crypto