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.

TMS320F28388D: TMS320F28388D CPU1 software reset with connected Debugger

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

Hello,

I want to develop an own bootloader for CPU1. 

I can use the software reset without a connected Debugger. This works.

With Debugger I want to use the emulation register. But it seems that this doesn't work.

I use CCS v20, C2000Ware v6, TMS320F28388D control card, on board Debugger.

S2 is switched to Flash boot. S1 without debugger -> software Reset works
I want to debug my programm with S1 enabled Debugger.

I want to emulate the Flash Boot with start on section 0.

#define CPU1BOOTPINCONFIG   (*(volatile uint32_t *)0x00000D00U)
#define CPU1EMUBOOTDEF_LOW  (*(volatile uint32_t *)0x00000D04U)
#define CPU1EMUBOOTDEF_HIGH (*(volatile uint32_t *)0x00000D06U)

    // 1. Zero Boot Pins used
    CPU1BOOTPINCONFIG = 0x5AFFFFFF;

    // 2. Bootdef: Table 0, Mode 3 = Flash Boot
    CPU1EMUBOOTDEF_LOW = (0x5AUL << 24) | 0x03UL;

    // 3. Boot options: Section 0
    CPU1EMUBOOTDEF_HIGH = (0x5AUL << 24) | 0x00UL;
 
    SysCtl_resetDevice(); /* Watchdog Reset */
 

It seems at the moment, that the ROM bootloader runs in Wait Boot.

Additional question, but not relevant at the moment:

Do I use the same register with adapted values to create a Reset with start from RAM on the CPU2?

Thank you

Best regards

Steffen Rose

  • Hi Steffen,

    You don't need to put the 0x5A in CPU1EMUBOOTDEF_LOW and CPU1EMUBOOTDEF_LOW. Writing 0x03 (flash boot) in CPU1EMUBOOTDEF_LOW is enough. 

    You can boot CPU2 through software by using the Device_bootCPU2() function defined in the device.c file in C2000Ware. Please refer to the multicore LED blinky example in C2000Ware (C2000Ware_Install_Location\driverlib\f2838x\examples\c28x_dual\led\CCS) for an example. 

    Kind regards,

    Skyler

  • To add on to what Skyler mentioned, please verify that the emulation boot configurations at 0xD00 were properly written in the CCS memory browser.

    Best,

    Matt

  • Thank you very much for your answer. 


    I changed my source to:

    #define CPU1BOOTPINCONFIG   (*(volatile uint32_t *)0x00000D00U)
    #define CPU1EMUBOOTDEF_LOW  (*(volatile uint32_t *)0x00000D04U)
    #define CPU1EMUBOOTDEF_HIGH (*(volatile uint32_t *)0x00000D06U)

    // Zero Boot Pins
    CPU1BOOTPINCONFIG = 0x5AFFFFFF;

    // Bootdef: Table 0, Mode 3 = Flash Boot
    CPU1EMUBOOTDEF_LOW = 0x03UL;

    // Boot options: Flash Section 0
    CPU1EMUBOOTDEF_HIGH = 0x00UL;

    SysCtl_resetDevice(); /* Watchdog Reset */

    But also with this changes the Debugger reset to 0x3FB114.

    I understand, that this means, that something is wrong. So I can only say, if I change the S1 switched to disable the debugger the Reset works.

    If I enable the S1 switches to enable the JTAG, but without a connected CCS v20 debugger, it works, too.

    Only, if I want to debug my own bootloader, the reset doesn't work.

    Are I'm right, the EMU settings are only used with connected Debugger? So it should work to Debug my functionality?
    The Reset using the Debugger Restart button works, too.

      

    As I have understand the memory on 0xD00 is write only, isn't it?

    In other case - I see random numbers in the memory window on 0xD00.

    But the assembler source seems to be good:

        0x083395    28A9FFFF    MOV          @AL, #0xffff
        0x083397    28A85AFF    MOV          @AH, #0x5aff
        0x083399    BDA90D00    VMOV32       *(0:0x0d00), @ACC
        0x08339B    0203        MOVB         ACC, #3
        0x08339C    BDA90D04    VMOV32       *(0:0x0d04), @ACC
        0x08339E    0200        MOVB         ACC, #0
        0x08339F    BDA90D06    VMOV32       *(0:0x0d06), @ACC
        0x0833A1    76483456    LCR          SysCtl_resetDevice

    Best regards

    Steffen

  • Hi Steffen,

    In other case - I see random numbers in the memory window on 0xD00.

    You should see the values you wrote to the 0xD00 addresses in the memory window. Is that not the case?

    The Reset using the Debugger Restart button works, too.

    This works after you've written the EMU boot locations in memory, correct?

    Kind regards,

    Skyler

  • Hello Skyler,

    at the moment I'm confused. I read, that the EMU register are write only, because the values are forwarded to the debug module.

    I see only wrong value.

    0xd00: 1B552945 59211B3E 0A74ABC2 0008308A 0008308A (data and program show the same)

    Can you confirm, that I use the right addresses?


    It seems to be the location of the PIE Vector table. (Reset .. INT3)

    In the user manual I found this addresses in the table: CPU1 Boot ROM Registers

    Is it correct, that it is the same address, but on different busses? Or is it a different state/remap view?

    The Debugger reset button works in every situation, independent of my write. My intention of this information were, that the system itself is configured correctly (jumper etc.).

     Thank you

    BR 

    Steffen

  • Hi Steffen,

    You should be able to see the proper values being written to these registers. Do you have the continuous refresh option selected in the memory browser view?

    Kind regards,

    Skyler

  • Hello Skyler,

    I tested the manual and the cyclic refresh. Also I checked that this windows works on normal RAM.

    I think I use the wrong addresses.

    But I don't found the right one. I checked the user manual and the driverlib of C2000Ware v6.

    Best regards

    Steffen