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.

TMDSCNCD28388D: How to use CCS to load and run c28 and cm code so enet examples run well

Part Number: TMDSCNCD28388D
Other Parts Discussed in Thread: C2000WARE,

I'm new to C2000Ware, CCS and modern TI architectures. The last TI board I worked with was the C44 Maranello board back in the 90's. I'm having challenges with the ethernet examples (which require a coordinated load and start of code on CPU_1 and CM)...

We are using C2000Ware_4_03_00_00 and a TMDSCNCD28388D development board.

First examples attempted were for Ethernet: projects enet_lwip and enet_lwip_udp.

They both fail because they are stuck in a loop in the Ethernet_resetModule() function (in ethernet.c).

I did not realize at first that CPU_1 must be involved for the examples (which target the ARM/CM) to work. I learned by searching this forum that the C28 CPU_1 must run code to set up GPIOs for clocks to drive the Ethernet (at least that is my understanding).

From my reading in this forum, I should be able to use project ethernet_c28x_config, on CPU_1 to configure the GPIOs for Ethernet. Alternatively, I could use project "cm_common_config_c28x" if I first define symbol "ETHERNET" in the project settings.

However, it appears from the forum posts that the developer must force things to happen in a certain order... CPU_1 code must somehow be run first (or run to a breakpoint) prior to running one of those ARM projects. One person said to load the C28 project, then load the CM (ARM) project, then RUN the C28 project (after first setting a breakpoint), and finally RUN the CM code last. I assume the CCS IDE provides a way to accomplish the necessary dance, but I need instructions on how to accomplish it.

How can one use the CCS tool to load (but not start) code onto CPU_1, then load (but not start) code onto the CM, then debug/run just CPU_1, and finally run the code that is already loaded onto the CM? I don't understand how to use CCS to load the two programs without running them, and then to individually reconnect and start what was loaded, in order to force execution order.

Also, the CM project is configured to run from flash out-of-the-box. I see messages when I debug that (if I understand correctly) you should not run a program from RAM on CPU_1 and a program from Flash on the ARM, because the upload/flash process will overwrite RAM, disturbing the C28x program which was loaded. I am probably just confused and misunderstanding what I am reading and the issues involved.

Basically, I need to understand how to load the C28x example, the CM example, and run them together in the proper sequence. That is a dance I don't understand how to do with the CCS tool.

Here are some posts I read to which I made reference:

e2e.ti.com/.../ccs-tms320f28388d-unable-to-run-ethernet-examples

e2e.ti.com/.../tmdscncd28388d-stop-with-ethernet_resetmodule-in-lwip

  • Hi,

    The CPu1 (C28x1) is the master core in this device and must be connected and loaded prior to the other cores. The clocks and other basic system initialization must be done by the CPU1 application. For example, if you want to run a CM example, CPU1 should be loaded with a basic application that does the system initialization.

    For Ethernet, you can find this initialization done in the following project - ethernet_c28x_config  or cm_common_config_c28x with Ethernet symbol predeffined. 

    To run , you can follow the following steps 

    1. 

    Under Target Configurations, right click on the target configuration file for F28388D and select ‘Launch selected configuration’. 

    2. Connect CPU1 , load the ethernet_c28x_config or cm_common_config_c28x binary file and then run it .
    3. Conect the Cortex_M4 core (CM core) and then load the ethernet example to it. 
    4. Then run the CM core .
    Best Regards
    Siddharth
  • Thank you. This resolves the issue with regard to sequencing the application example to run after CPU1 has completed the system initialization, but I wonder - what is typically done to guarantee that application execution on the CM is delayed until the system initialization is completed on CPU1 in a deployed or automatic configuration, without use of the debugger to load and start each program manually?

  • Hi,

    CPU2 and CM needs to be booted by CPU1 application after it has completed system initialization.This can be done by using the driverlib functions Device_bootCPU2 and Device_bootCM

    For more details, pls refer the following guide

    software-dl.ti.com/.../intro.html