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: What determines time from XRS to entry to Main

Part Number: TMS320F28379D

I am getting a 73ms time from XRS to entry to main running my code on the LaunchXL eval board (with TRST set to stand-alone). That is too long for processor startup/reset deadlines on my project.

To help me address this issue, I have a few questions:

1. How long does it take the TI boot ROM code to execute a standard boot from flash and entry to code_start ? I can't find any timings in the tech ref manual or data sheet.

2. After exiting the boot ROM, what determines the time between code_start in the RTS and entry to main() in user code?  I have already had to disable the watchodog timer so I know it is more than 13ms.

3. Can you confirm the following: The boot ROM and RTS c_int00 code execute at default 10MHz with 15 flash wait states until such time as the user code is entered in man()?

Depending on the aswers - any suggestions on reducing the startup times would be greatly appreciated.

Thanks.

John

  • Hi John, 

    Thanks for reaching out.  Our subject matter expert is out for the holidays, so we will have to wait for the specific details until next week.  However, here is some initial feedback:

    1. How long does it take the TI boot ROM code to execute a standard boot from flash and entry to code_start ? I can't find any timings in the tech ref manual or data sheet.

    The standard boot ROM code runs from internal ROM (not from flash) before branching to the application.  The execution of the application depends on the boot mode.  Which boot mode are you using? 

    2. After exiting the boot ROM, what determines the time between code_start in the RTS and entry to main() in user code?  I have already had to disable the watchodog timer so I know it is more than 13ms.

    You can step through the code from _c_int00 to main in the debugger.  Please let us know if you need help with configuring this.

    3. Can you confirm the following: The boot ROM and RTS c_int00 code execute at default 10MHz with 15 flash wait states until such time as the user code is entered in man()?

    I believe the answer is yes, because the bootROM code runs with PLL in bypass and the flash wait states are configured as part of the flash initialization which is run as part of the application init, but I will have to confirm this operation. 

    However to simplify this debug, you may just want to configure wait boot, load your application into RAM to compare the latencies with what you are apparently seeing with Flash.

    Regards,

    Krishna

  • Thanks for a quick response.

    1. How long does it take the TI boot ROM code to execute a standard boot from flash and entry to code_start ? I can't find any timings in the tech ref manual or data sheet.

    The standard boot ROM code runs from internal ROM (not from flash) before branching to the application.  The execution of the application depends on the boot mode.  Which boot mode are you using?

    I'm using the LANCHXL-F28379D eval board. TRST = 0, GPIO72 = 1, GPIO84 = 1, so should be in GetMode.

    The OTP has been left at defaults, and I believe the boot ROM therefore boots from flash.

    Checked CPU1 Boot ROM Status @ 0x0000 002C = 0x0000 4F00 so bit 9 = 1 Flash boot has started (as expected)

    Checked CPU1 Boot Mode Address @ 0x0000 0038 = 0x0000 000B = Flash Boot (as expected)

    I don't understand what this means:

    configure wait boot, load your application into RAM

    I can see how to get it into wait boot but then how does the RAM get loaded?

  • John, 

    Thanks for your feedback.  Are you connected to the target via the debugger?  If yes, you would load the application into RAM using the debugger.  You may consider running your benchmarks with the application loaded in RAM...

    Regards,

    Krishna

  • Thanks for the suggestion. In the end product the code runs from Flash - apart from a few critical routines in RAM -  so that rnning in Flash is what I need to address.

    However, the benchmark might be useful, but I have no way of timing _c_int00 to main as you suggest for executing in RAM. Can you suggest a method?

    At the moment I'm phsically measuring the time on a 'scope from XRS to outputing a pulse on a GPIO line first thing entry main(). When running in teh debugger, there is no XRS so can't measure it that way.

  • Hi,

    Are you able to provide an anwswer for:

    1. How long does it take the TI boot ROM code to execute a standard boot from flash and entry to code_start ? I can't find any timings in the tech ref manual or data sheet.

    I'm using the LANCHXL-F28379D eval board. TRST = 0, GPIO72 = 1, GPIO84 = 1, so should be in GetMode.

    The OTP has been left at defaults, and I believe the boot ROM therefore boots from flash.

    Checked CPU1 Boot ROM Status @ 0x0000 002C = 0x0000 4F00 so bit 9 = 1 Flash boot has started (as expected)

    Checked CPU1 Boot Mode Address @ 0x0000 0038 = 0x0000 000B = Flash Boot (as expected)

    So I would like to know how much time from XRS (entry to TI boot ROM) to   .sect "codestart" code_start:  in F2837xD_CodeStartBranch.asm (exit from TI boot ROM).

  • Hi John, 

    Sorry about the delay in reply for your following question in the previous post.

    However, the benchmark might be useful, but I have no way of timing _c_int00 to main as you suggest for executing in RAM. Can you suggest a method?

    Please follow the steps below to setup to do this benchmark.  

    1. Bring up CCS and connect to your target. 

    2. Switch to the Debug perspective but *do not* load your application.

    3. From the menu bar select the following:  Tools->Debugger Options->Auto Run and Launch Options

    4. Under Auto Run Options, deselect the "On a program load or restart" option.  Note:  By default, the application is configured to run to main.

    5. Select "Remember My Settings"

    6. Enable the profiler from tool bar as follows:  Run->Clock-Enable.  

    7. Notice a clock icon and counter (reset to 0) shows up within the bottom border of CCS (typically on the bottom right hand corner, but could be on the left)

        Double click on the profile clock to reset it to 0 ( if not already 0)

    8. Load your application.  Note:  At the end of the load, the target is halted at _c_int00

    9. If the profile clock shows it is non-zero. reset it as described in step 7.

    10.  From the tools menu select Run->Go Main.

    11. See the cycles reported by the profile clock for execution from _c_int00 to main.

    12  In order to repeat the test, reset the profile clock and  select Run ->Restart.

    Thanks,

    Krishna 

  • Thanks for the details. This helped me to resolve my issue.

    It confirmed boot ROM takes 1.5ms and _c_int00() was taking 70+ms to initialise static data.

    Also confirmed that _c_int00() runs with default Flash wait states and 10Mhz clock and hence is very slow.

    _system_pre_init() can be used to insert code to setup flash and clock to run 10x faster BEFORE static data initialisation.