This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TMS320F28379D: Dual Core Programming - Setup/Initialization

Part Number: TMS320F28379D

Tool/software: Code Composer Studio

Hi,

I am working on a project wherein, I need to use both cores of the MCU. I am having few doubts regarding the programming. Please correct me If I am wrong.

  1. All the Initialization needs to be done by core 1 only.
  2. If I am using a peripheral in Core -2 then, I have to use "GPIO_setMasterCore"  API to that Pin number to specify the core.
  3. If using Both Cores, I have to specify "GPIO_setMasterCore" for all the IO's on Core 1 and Core 2 or only for Core 2 IO's/Peripherals?
  4. Both CPU's Have Timer 0, 1, & 2. And If All the initialization needs to be done in core 1 then, How will I differentiate Between Core 1 and Core 2 Timers? Or CPU 2 timers initialization needs to be done in core 2 only?

Regards

Vishal

  • Hi Vishal,

    All the Initialization needs to be done by core 1 only.

    Yes, that is correct. There are global initialization which need to be done by CPU1 but local initialization (e.g. enabling the clock to peripherals) need to be done by CPU which owns that resource.

    If I am using a peripheral in Core -2 then, I have to use "GPIO_setMasterCore"  API to that Pin number to specify the core.

    No, that is only if pin used as GPIO. If pin functions as peripheral then as long as peripheral is assigned to other code, associated pins are get allocated to that CPU.

    If using Both Cores, I have to specify "GPIO_setMasterCore" for all the IO's on Core 1 and Core 2 or only for Core 2 IO's/Peripherals?

    Covered in last point.

    Both CPU's Have Timer 0, 1, & 2. And If All the initialization needs to be done in core 1 then, How will I differentiate Between Core 1 and Core 2 Timers? Or CPU 2 timers initialization needs to be done in core 2 only?

    This need to be done by CPU2 only. As mentioned in point # 1, timers are local resources dedicated to each CPU.

    Regards,

    Vivek Singh

  • Hi Vivek,

    Thanks for your response. 

    1. Lets Take Example of ADC-Read on CPU2
    • Configure/Initialization: CPU1
    • Configure SOC: CPU2
    • READ-ADC: CPU2

    Is the Above part Correct?

    2. Second point: If All the initialization has to be done by CPU1 and GPIO_setMasterCore is used only for GPIO's , Do I need to Initialize peripherals of CPU2 in CPU2 code itself?

        GPIO_setMasterCore(25, GPIO_CORE_CPU1);
        GPIO_setPinConfig(GPIO_25_SPISOMIB);
        GPIO_setPadConfig(25, GPIO_PIN_TYPE_PULLUP);
        GPIO_setQualificationMode(25, GPIO_QUAL_ASYNC);
    
        //
        // GPIO24 is the SPISIMOB clock pin.
        //
        GPIO_setMasterCore(24, GPIO_CORE_CPU1);
        GPIO_setPinConfig(GPIO_24_SPISIMOB);
        GPIO_setPadConfig(24, GPIO_PIN_TYPE_PULLUP);
        GPIO_setQualificationMode(24, GPIO_QUAL_ASYNC);

    For the Code Above, "

    GPIO_setMasterCore(25, GPIO_CORE_CPU1);" Does this Line needed? If I am using it in CPU1 or CPU2 ? or no?

    Where Can i find more details about Dual Core programming ?




    Regards

    Vishal



















  • Hi,

    Steps for ADC example is correct.

    1
    GPIO_setMasterCore(25, GPIO_CORE_CPU1);" Does this Line needed? If I am using it in CPU1 or CPU2 ? or no?

    No this is not needed since pins are used as SPI (and not GPIO)

    Where Can i find more details about Dual Core programming ?

    All the examples are available in C2000Ware (device_support\f2837xd\examples\dual).

    Regards,

    Vivek Singh