2.5 Adding Harmony Modules to Project

1. Go to MCC Project Graph window, as opened in previous step.
Figure 2-6. MCC Project Graph
2. Add Board Component.
  • On Device Resources, navigate to System Hardware Definitions (SHD), Main Boards and click on + sign next to PIC32CXMTG -EK.
    Figure 2-7. Add Board Component
  • This triggers the Core Component Auto Activation.
    Figure 2-8. Add Core Component
  • Click No when prompted for adding FreeRTOS component. This example is a Baremetal project.
    Figure 2-9. Do Not Add FreeRTOS

3. Connect PL460 Evaluation Kit.

  • Click on PC32CXMTG-EK component, on Configuration Options set the Xplained Pro on External Connectors to PL460 Evaluation Kit (PLC PHY).
    Figure 2-10. Configure Xplained Pro
  • This triggers the PLC PHY Driver and FLEXCOM5 Auto Activation and Auto Connection.
    Figure 2-11. Add PLC PHY Component
    Figure 2-12. Connect PLC PHY and FLEXCOM5
  • This triggers the ADC Auto Activation.
    Figure 2-13. Add ADC Component
  • FLEXCOM5 component is auto-configured when connected to PLC PHY component, as seen in this figure:
    Figure 2-14. Configure Flexcom5
  • Click on PLC PHY component, on Configuration Options set the PLC Profile to PRIME as seen in this figure:
    Figure 2-15. Configure PLC PHY
4. Add PLC Coupling Component.
  • Right-Click on PCOUP dependency and select Satisfiers → PLC PHY Coupling (srv_pcoup).
    Figure 2-16. Select PLC PHY Coupling
  • PCOUP component is auto-configured when added.

5. Add Console Component.

  • Click on PC32CXMTG-EK component, on Configuration Options enable the Virtual COM Port interface on USB debugger interface.
    Figure 2-17. Configure COM port
  • This triggers the CONSOLE and FLEXCOM0 Auto Activation and Auto Connection.
    Figure 2-18. Add Console and Flexcom0
    Figure 2-19. Connect Console and Flexcom0
  • FLEXCOM0 component is auto-configured when connected to Console component, but it is recommended to increase the Ring Buffer Size to 1024 as seen in this figure:
    Figure 2-20. Configure Flexcom0
6. Add Debug Component.
  • Right-Click on SYS_CONSOLE capability and select Consumers→ DEBUG (sys_debug).
    Figure 2-21. Select DEBUG
  • DEBUG component is auto-configured when added.
7. Add PLC PVDD Monitor Component.
  • Right-Click on ADC capability and select Consumers→ PLC PVDD Monitor (srv_pvddmon).
    Figure 2-22. Select PLC PVDD Monitor Component
  • Click on ADC component, on Configuration Options set Prescaler and Channel 4 Options so configuration matches the following:
    Figure 2-23. Configure ADC
  • Click on PLC PVDD Monitor component, on Configuration Options set Channel 4 so configuration matches the following:
    Figure 2-24. Configure PVDD Monitor
8. Add Time Component.
  • On Device Resources, navigate to System Services and click on + sign next to Time.
    Figure 2-25. Add Time Component
  • Right-Click on TMR dependency and select Satisfiers → TC0 (tc0).
    Figure 2-26. Select TC0
  • Click on TC0 component, on Configuration Options set Clock Source to MCK0/128 on Channel 0 so configuration matches the following:
    Figure 2-27. Configure TC0

9. Add TRNG Component. On Device Resources, navigate to Peripherals and click on + sign next to TRNG.

Figure 2-28. Add TRNG
10. Add RF215 Component.
  • On Device Resources, navigate to SmartEnergy → Drivers and click on + sign next to RF215.
    Figure 2-29. Add RF215 Component
  • Right-Click on SPI dependency and select Satisfiers → FLEXCOM3 (flexcom3).
    Figure 2-30. 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 2-31. Configure RF215
11. Add Crypto Library Component.
  • On Device Resources, navigate to Libraries and click on + sign next to Crypto_v4.
    Figure 2-32. Add Crypto Library Component
  • Right-Click on LIB_WOLFCRYPT dependency and select Satisfiers → wolfCrypt Library (lib_wolfcrypt).
    Figure 2-33. Select WolfCrypt
  • Click on wolfCrypt Library component, on Configuration Options enable Security options required by PRIME, as seen in this figure:
    Figure 2-34. Configure Crypto
12. Add USI Component.
  • On Device Resources, navigate to SmartEnergy → Services and click on + sign next to USI.
    Figure 2-35. Add USI Component
  • Right-Click on UART dependency and select Satisfiers → FLEXCOM7 (flexcom7).
    Figure 2-36. Select Flexcom7
  • FLEXCOM7 component is auto-configured when connected to USI component.

13. Add Memory Component.

  • Right-Click on SEFC0 capability and select Consumers→ MEMORY (drv_memory).
    Figure 2-37. Select Memory
  • The Memory and SEFC0 components are auto-configured when connected to PRIME Firmware Upgrade component.

14. Enable Leds.

  • Click on PC32CXMTG-EK component, on Configuration Options enable Green Led and Blue Led on Digital Interface.
    Figure 2-38. Enable Leds

The final MCC Project Graph with the added Harmony modules should look like this:

Figure 2-39. MCC Project Graph with Harmony Modules