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: Trying to run two CPUs in stand alone mode

Part Number: TMS320F28379D
Other Parts Discussed in Thread: SYSCONFIG, C2000WARE

Tool/software:

Hi,

I have a program that receives a command through SCI from both CPUs and echos that on both CPUs. So I could see if the CPUs reset/restart on two terminals.

I am using "DelfinoTm TMS320F28379D control CARD R1.3". I have not been able to run this program after a power cycle without starting a debug session. Here are the steps I take and tried. When I mention multiple options in one step it means I've tried all the permutations of these steps with the combinations listed.

  1.  on the card A;SW1 is on '10' position. Position 1 is ON and position 2 is off. This allows debugging using XDS100V2 onboard emulator.
  2. Program is built with FLASH config as Active.
  3. Program is loaded either as 'Debug as -> 1 code composer debug session' or 'Run -> Load -> Project name'.      
    1. When 'Debug as ...' option is used I could see both cpus halted at main symbol which could be resumed and will work fine.The CPUs will continue running even when Debug session is terminated  
    2. When 'Run' option is used, I could briefly see that CCS switches to Debug perspective and then exits. CPUs don't start.
  4.  I turn off the power (from the based board).
  5.  Disconnect the usb cable from the control card. Used for programming/debugging with XDS100V2.
  6. All the permutations of the following are tried:
    1. A;SW1 position 1 is turned OFF. This is to put NTRST = 0
    2. SW1 both positions or turned ON. This is to put the boot config in 'GetMode'.
    3. in practice I have tried all the possible combination of positions of the switches, just to make sure I'm not mistaken on which side is on or off.
  7. Turn the power on

I expect the terminals to show that CPUs reset and start the program.

In a debug session, from looking at the registers, I've confirmed that the Zx-BOOTCTRL values don't have 0x5A in them.

What am I missing?

The project is based on a TI example, so all the configs are identical to "sci_ex2_sysconfig".

I'm running CCS 12.8.1.00005 on Windows 11 Professional. I'm Using 'C200Ware_5_04_00_00' and 'ti-cgt-C2000_22.6.1.LTS'.

Thanks in advance.

  • Hello,

    on the card A;SW1 is on '10' position. Position 1 is ON and position 2 is off. This allows debugging using XDS100V2 onboard emulator.

    From your boot flow, it sounds like you're trying to execute a standalone boot to flash? If so, you need A:SW1 position 1 to be OFF.

    Please follow the controlCard user's guide for configuring the device for a standalone boot from Flash:

    Can you also share a picture of your controlCard switches?

    Best,

    Matt

  • Hi Matt,

    Thanks for the response. I'd like to be able to execute the program From the flash (Is it different from booting To flash?). I imagined the steps to be: 1) program the flash through XDS100V2; 2) Run the program from the flash

    I do turn A:SW1 off after I program the processor. (as described in step 6-a)

    I have also tried leaving it as is and just unplug the cable. This is what I meant by saying trying all combinations (step 6-c)

    Here's a photo of the control card with the A:SW1, position 1, in ON position:

    Again, I change the position 1 of the A:SW1 to 'off' after the board is programmed through XDS100V2.

  • Hi,

    I'd like to be able to execute the program From the flash (Is it different from booting To flash?)

    Apologies, boot to flash == boot from flash

    I replicated your controlCard switch configuration on my setup and was able to get an LED blink example working. Can you confirm the location of the codestart for the application? It must be at 0x80000 for the device to boot the correct flash entry point.

    Best,

    Matt

  • Hi Matt,

    Thanks for looking into this. codestart for both CPUs is at "00080000". At least according to the map files.

    Is there anywhere else I should check?

  • Hi,

    Can you try this procedure with the simple LED blink example in C2000Ware (C2000Ware_5_04_00_00\driverlib\f2837xd\examples\cpu1\led)? I want to rule out the possibility of application error.

    Best,

    Matt

  • Sure, will do and keep you posted. What kind of application error could cause this to happen? I'll have to look into that as well.

  • Matt,

    I tried an LED project from the examples and I only had to make it to program to flash instead of ram, and it seems to work even without flipping A:SW1, position 1, to off or even disconnecting the cable.

    Any suggestions on where to look next?

  • Hi Ehsan,

    I recommend emulating a boot to flash by configuring the emulation boot registers (EMU_BOOTCTRL). By emulating boot to flash, you can view the current state of the device and debug why the application isn't working.

    You can do this easily by connecting to the device and navigating to Scripts > EMU Boot Mode Select > EMU_BOOT_FLASH. Then, reset the CPU and the device will emulate boot to flash. You can load the symbols for the application to further debug.

    Best,

    Matt

  • Hi Matt,

    Thanks for the suggestion.
    I followed the steps. After cpu reset, program counter points to _System_post_cinit() (@0x08369) which I believe is past the codestart. I stepped over the assembly instructions which seemed to loop. I checked the value of "CPU1 EMU_BOOTCTRL Register" through the memeory browser and it seems to have the expected value:


    0x0B5A is equivalent to EMU_KEY of 0x5A and EMU_BMODE of 0x0B :

       

    Even though stepping through the assembly code did not seem to progress, Resuming it, will work. which at any rate tells me after reset I have been past any problematic symbol.

    Did I understand your suggestion correctly? What are your thoughts?

  • Hi,

    Can you try loading the symbols (i.e. the *.out file) for your application? When you reset the device, you will be executing in the boot ROM. You can then set a break point in your application to resume debugging from there.

    Best,
    Matt

  • Hi Matt,

    I tried various permutation of connecting to the device, loading the symbols and resetting the CPU (from debug menu and power cycle) but I'm not sure what to expect from taking these steps. Eventually all these permutations bring me to the beginning of the main() which runs fine and had always run fine.

    To reiterate, my only problem is that the program doesn't run after power cycle, without reconnecting the emulator. i.e. the program itself doesn't seem to have any issues. I am using SysConfig for creating the linker file

    Could you please elaborate what is the expected outcome of following these steps? Maybe I'm skipping over something without knowing it.

    Would that help if I upload the .out or .map files for you?

  • Hi,

    To reiterate, my only problem is that the program doesn't run after power cycle, without reconnecting the emulator. i.e. the program itself doesn't seem to have any issues. I am using SysConfig for creating the linker file

    I'm providing these steps so you can emulate a boot to flash to debug why the device isn't able to run the program after a power cycle. These steps take you from device reset all the way to running the application. It's unusual that you're able to run an LED blink example after power cycling with the same external switch configuration, which had me suspect something isn't right with the application.

    If you could share the .out and .map files, that would be fantastic.

    Best,

    Matt

  • Thanks,

    I've uploaded the files here:
    https://windliftllc-my.sharepoint.com/personal/ehsan_windliftllc_onmicrosoft_com/_layouts/15/onedrive.aspx?id=%2Fpersonal%2Fehsan%5Fwindliftllc%5Fonmicrosoft%5Fcom%2FDocuments%2FStandaloneBoot&ga=1

    If you wanted to see the application working, there need to be two uart terminals connected to GPIO22/23 (TX/RX) and GPIO28/29 (RX/TX), with these settings:

    BR = 115200 ;

    word length = 8 ;

    stop mode = 1;

    no parity.

    To reach to that stage, both CPUs need to be running because they Sync at one point.

  • Hello,

    To reiterate, my only problem is that the program doesn't run after power cycle, without reconnecting the emulator. i.e. the program itself doesn't seem to have any issues. I am using SysConfig for creating the linker file

    How are you booting CPU2 when running standalone (without an emulator)? Please refer to the IPC examples in C2000Ware (C2000Ware_5_04_00_00\driverlib\f2837xd\examples\dual\ipc) showing how to boot CPU2 from the CPU1 application over IPC.

    A general flow for the CPU2 boot flow is detailed in Section 2.1.4 in this user's guide, albeit specific for F28P65x device registers: https://www.ti.com/lit/ug/sprujh3/sprujh3.pdf


    I'm having trouble accessing the sharepoint. If booting CPU2 isn't the issue, I'll send you my email over E2E direct messages to send the files.

    Best,

    Matt

  • Hi Matt,

    Thanks for drawing my attention to CPU2 boot flow. I had assumed that SysConfig was taking care of it but for some reason the line that handles the CPU2 boot flow was commented out along with instructions to manually add it to the main. It boots fine now as stand alone.

  • Hi Ehsan,

    I'm happy to hear that the resolution was simple! Thank you for updating the thread with the solution.

    Best,

    Matt