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: 28388D controlCard Power Up no startin the main program

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE

Hello,

I have a 28388DControlCard using the C2000Ware example of the CPUTimer to blink a led every second. I have program it in Flash and power down the 28388DControCard and after some seconds I power it up. I was hoping the 28388D will start-up and run the bootROm and then start the amin program, but is seem it get cough in the following line and never enters the main program. 

3fb114:   6F00        SB           0, UNC

This also happens when the system comes from a Watchdog reset or form the external reset button.

According to the  f2838x_codestartbranch.asm

;// For these examples, code_start is the first code that is executed after
;// exiting the boot ROM code.

;// In addition, the example F2838x projects are setup such that the codegen
;// entry point is also set to the code_start label.

I hope you could give me some information on how to s make my programs run after power up or after making a reset.

Best regards,

David

  • David,

    If you have CCS connected then device boots as per emulation boot. Please refer the emulation boot section in TRM and set the emulation boot as boot to flash so that it boots as expected. In case of debugger not connected, please check the boot pin setting on board to make sure it is set properly to BOOT to flash.

    Regards,

    Vivek Singh

  • HI,

    If you have CCS connected then device boots as per emulation boot.-->I will check that, but I think is ok.

    When the debbuger is not connected and I power it up I have check like three times the proper boot I selected. According to page 681 in TRM pins GPIO72 and GPIO 84  must be set to 1.

    Flash / USB(2) 1 1

    Those pins according to TMS320F28388D controlCARD Information Guide (Rev. B) page 9

    S2 Boot Mode Switch:Controls the Boot Options of the F2838x device, see Table 3. For a full description see the device datasheet.

    S2 are set to ON.

    As far as I know, that is everything I have to do. And the led never blinks.

    regards,

    David

  • Please try below step -

    • Power-up the board.
    • Connect CCS.
    • Issue reset from CCS
    • Click on "Script -> EMU Boot Mode Select -> EMU_BOOT_FLASH" in CCS
    • Click on Run

    Let us know if this is working and CPU jumps to your application code. Basically idea is not to load the code after power-up since it's already in flash. If it's not working then you need to check the entry point of your code and make sure it's proper.

  • Hi,

    Now is working on the code from C200Ware but not on my code. On my code the DSP jumps to other point.


    3fe96f:   7625        ESTOP0  

    Should I open other question and close this one?

    BR,

    David

  • No, we can continue discussion here. Did you check the entry point setting in your code ?

    Regards,

    Vivek Singh

  • The entry point you mean, where is located the first line of the main?

    The first line of the main is located here:
    0835f1:   76483BA5    LCR          SysCtl_getWatchdogResetStatu

    Best regards,

    David

  • Hi,

    Entry point is the location of Ist instruction of your application code where CPU jumps after executing the BOOTCODE. It should be at 0x80000 address by default. By default it should be code_start function which is part of "F2837xS_CodeStartBranch.asm" code. Please see where is this mapped in your .out file. You can open the dis-assembly view in CCS and check for this function. 

    Regards,

    Vivek Singh

  • Hi,

    indeed, I am using the f2838x_codestartbranch.asm given by the C2000Ware. There are these lines:

    WD_DISABLE  .set  1    ;set to 1 to disable WD, else set to 0
        .ref _c_int00
        .global code_start
    ***********************************************************************
    * Function: codestart section
    *
    * Description: Branch to code starting point
    ***********************************************************************
        .sect "codestart"
    And I am also using the 2838x_FLASH_lnk_cpu1.cmd
    Than point the code start section here:
    SECTIONS
    {
       codestart           : > BEGIN, ALIGN(8)
    And begin is set at:
    MEMORY
    {
       /* BEGIN is used for the "boot to Flash" bootloader mode   */
       BEGIN            : origin = 0x080000, length = 0x000002
    That part is the beginning of the flash. At least according to the memory map on the
    :FLASH 

    Sector 0 8K x 16 0x0008 0000 0x0008 1FFF
    Best regards,
    David
  • David,

    After connecting to CCS open disassembly view and check what is mapped at 0x80000 location. If you see code_start then it's good and set a breakpoint there and follow the step which I provided earlier to see if CPU halts there. If it does then set another breakpoint at main() function and again run and see if it is jumping to main. 

    Regards,

    Vivek Singh

  • Hi,

    I have checked,and you are right, on that part of the assemble I have the following:

    080000:   FFFF        ITRAP1      
    080001:   FFFF        ITRAP1

    But I have checked the .map and I have found the following.

    SECTION ALLOCATION MAP
     output                                  attributes/
    section   page    origin      length       input sections
    --------  ----  ----------  ----------   ----------------
    codestart
    *          0    00080000    00000002    
                      00080000    00000002     f2838x_codestartbranch.obj (codestart)
    So I do not understand why it not on the assembly.
    Best regards,
    David
  • David,

    Look like it's getting optimized. I suggest you download the latest C2000Ware and pick up the f2838x_codestartbranch.asm from there and try again. 

    Regards,

    Vivek Singh

  • Hi,

    This have solved the problem. It is possible to close the question.

    Thanks a lot for your time.

    BR

    David