Configuring the dsPIC33CH Secondary Project in MPLAB® Code Configurator (MCC) Melody

Last modified by Microchip on 2024/04/10 13:48

Create the Secondary Project

  • Create an MPLAB® X IDE project with the secondary device selected from the dsPIC33CH family.
  • Launch MPLAB® Code Configurator (MCC) by:
    • Clicking on the MCC icon in MPLAB X IDE, or
    • Navigating to Tools > Embedded > MPLAB Code Configurator v5: Open/Close in the top menu bar.
  • When MCC Content Manager prompts you, click the Next button under MCC Melody.
  • Main Core appears as a Project Resource of the secondary project in the Resource Management [MCC] window. Select Main Core to open the Easy View settings dialog box for Main Core in MCC.

The Main Core contains the configuration fuses of the Secondary Core that were configured in the main project. To display the settings selected in the main project, those settings need to be imported from the main project.

For a dual-core device that has a Secondary Core with Flash, The Main Core Config file contains only the MSI configuration fuses and Output Pin Ownership fuses for the Secondary Core.

Import Secondary Settings

Fuses related to the Secondary Core are configured in the main project and MCC Melody facilitates exporting and importing these configuration details to the secondary project. Exporting settings from the main project are explained on the "Exporting Secondary Settings from Main Project in MCC Melody" page.

To import the settings, click on the Load File button in the Main Core settings window. The settings are saved in the MainCoreConfig.JSON file, which resides in the file path that has been considered at the time of export configurations. Select the file for import.

Upon Import:

  • All settings related to the Secondary Core that were configured in the main project get updated to the secondary project.
  • The updated settings become non-editable fields. Only MSI interrupts can be enabled manually.

For dual-core devices that have a Secondary Core with Flash, only MSI Configurations and Pin Ownership information get updated upon importing the settings to the secondary project (Main Core).

Importing the settings from the main project to the secondary project

Configuring MSI

Upon Import, MSI controls become non-editable in the secondary project. All the settings related to MSI have to be done in the main project and must be imported from the main project.

Configuring Secondary ICD, OSCILLATOR, Watchdog Timer, Deadman Timer, Alternate I2C Pins, SPI Pin Mapping, and Context Interrupts

For dual-core devices that have a Secondary Core with Flash, the secondary ICD, OSCILLATOR, Watchdog Timer, Deadman Timer, Alternate I2C Pins, SPI pin mapping, and Context Interrupts have to be configured in the secondary project itself. Since the config bits related to these modules reside in Secondary Core.

On the first launch of MCC Melody, the configurations related to Secondary ICD, Oscillator, Watchdog Timer, Deadman Timer, Alternate I2C Pins, SPI pin mapping, and Context Interrupts have default values in the secondary project. If any change is required, the user has to modify these configurations in the main project, save the settings, and import the modified settings to the secondary project. After importing the settings, the user will see the configurations made in the main project, which are applicable to the secondary project.

Learn More

Procedure

Step-by-Step

Back to Top