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.

TMS320F28379D: Flashing both the core's and running them independently

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Tool/software:

C2000Ware Version: C2000Ware_5_00_00_00
Example Used: C:\ti\c2000\C2000Ware_5_00_00_00\device_support\f2837xd\examples\dual\blinky_dc

In the dual-core blinky LED example, GPIO34 is initialized and configured in the CPU1 core using the following functions:

GPIO_SetupPinMux(34, GPIO_MUX_CPU2, 0);
GPIO_SetupPinOptions(34, GPIO_OUTPUT, GPIO_PUSHPULL);

I want to independently flash and run the applications for both CPU1 and CPU2 on the F28379D LaunchPad. I have two questions regarding this setup:

Question 1:

How can I flash both the CPU1 and CPU2 applications onto the LaunchPad and run them independently?
What is the recommended procedure to program both cores from Code Composer Studio (CCS)?

Question 2:

I want the CPU2 core to control GPIO34 (which was initialized by CPU1).

  • How can CPU2 receive the direction configuration (i.e., set as output) for GPIO34 from CPU1?

  • Is using IPC the correct approach to send this information from CPU1 to CPU2?

  • Once CPU2 receives the direction configuration, how can it set the direction of GPIO34 accordingly and toggle the LED?

Please guide me on how to properly configure this setup using IPC, and what steps are required in the CPU2 core to take control of GPIO34 after receiving the data from CPU1.

  • Hi,

    How can I flash both the CPU1 and CPU2 applications onto the LaunchPad and run them independently?
    What is the recommended procedure to program both cores from Code Composer Studio (CCS)?

    Load the compiled .out files onto the respective cores in CCS and run CPU1 core then CPU2 core.

    I want the CPU2 core to control GPIO34 (which was initialized by CPU1).

    • How can CPU2 receive the direction configuration (i.e., set as output) for GPIO34 from CPU1?

    • Is using IPC the correct approach to send this information from CPU1 to CPU2?

    • Once CPU2 receives the direction configuration, how can it set the direction of GPIO34 accordingly and toggle the LED?

    Please guide me on how to properly configure this setup using IPC, and what steps are required in the CPU2 core to take control of GPIO34 after receiving the data from CPU1

    To transfer GPIO control from CPU1 to CPU2, you need to use the GPIO_setControllerCore() function. Here's how to do it: In CPU1's code:
    GPIO_setControllerCore(34, GPIO_CORE_CPU2); // Transfer control of GPIO34 to CPU2

    For sharing the GPIO configuration (direction, etc.) between cores, you have two options:

    a) Using IPC (Inter-Processor Communication):

    • This is the recommended approach for synchronizing GPIO configuration between cores
    • You can use the IPC module to send the configuration information from CPU1 to CPU2
    • The C2000Ware examples folder has an example called "ipc_ex1_gpio_toggle" that demonstrates this

    b) Direct configuration in CPU2:

    • After CPU1 transfers control to CPU2, CPU2 can directly configure the GPIO using GpioCtrlRegs

    Thanks

  • Hi, 

    Thank you for your insight.

    b) Direct configuration in CPU2:

    • After CPU1 transfers control to CPU2, CPU2 can directly configure the GPIO using GpioCtrlRegs

    The above point is not feasible because CPU2 does not have access to the GpioCtrlRegs—only CPU1 has control over them. Based on my observations, even after assigning control of the GPIO to CPU2 from CPU1, only the GPIO Data Registers are accessible from CPU2.

  • Hi,

    Yes all initialization including the direction/mux config needs to be done from CPU1 and then we transfer the control to CPU2 so that we can set/toggle/clear from CPU2 after.

    Most applications dont require changing the initial config hence doing that from CPU1 would be sufficient and then the pin set/clear/toggle can be done from CPU2 after that.

    Thanks