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.

F28M36P63C2: M3 bootloader to application: application wont run

Part Number: F28M36P63C2
Other Parts Discussed in Thread: CONTROLSUITE

I have two projects a bootloader and an application.

The bootloader jumps to the application fine via application-resetISR then goes to the correct _c_int00 as shown in application map file.

It then goes off into sector D where application code lives but nothing happens. 

The application code runs fine standalone. (blink led...write value to flash via flashAPI...blink led again)

Is there a difference in how application runs in debug as apposed to when started from a bootloader?

Any debug help is appreciated.

  • Regis,

    Do you see a reset/toggle on XRSn?
    Does your application service watchdog as needed?
    Do you have any initialized sections mapped to RAM directly in your linker cmd?

    You might have programmed ECC - I remember you say so in another post sometime last week.

    Thanks and regards,
    Vamsi
  • Also, do you have any IPC communication between the cores? If yes, did you check whether your code passed through it or not? - Toggle a GPIO after that and check for it.

    Thanks and regards,
    Vamsi
  • Thank you once again.
    I am only using the M3 right not. No IPC code yet.
    EEC is set to auto in the debug GUI.
    I am currently adding code to codestartbranch to disable the watchdog.

    I will address the other items as you recommend.
  • I am looking for an M3 codestartbranch.asm that includes watchdog disable but cant seem to find one.
  • Regis,

    If you want to disable it, check WatchdogResetDisable() function at controlSUITE\device_support\f28m36x\v210\MWare\driverlib\watchdog.c.

    Also, checkout RCGC0 register in SPRUHE8D.

    Thanks and regards,
    Vamsi
  • I was thinking something in assembly I can add to codestartbranch similar to this from DSP2833x_CodeStartBranch.asm :


    **********************************************************************
    * Function: wd_disable
    *
    * Description: Disables the watchdog timer
    ***********************************************************************
    .if WD_DISABLE == 1

    .text
    wd_disable:
    SETC OBJMODE ;Set OBJMODE for 28x object code
    EALLOW ;Enable EALLOW protected register access
    MOVZ DP, #7029h>>6 ;Set data page for WDCR register
    MOV @7029h, #0068h ;Set WDDIS bit in WDCR to disable WD
    EDIS ;Disable EALLOW protected register access
    LB _c_int00 ;Branch to start of boot.asm in RTS library

    .endif

    ;end wd_disable
  • Regis,

    you should be able to call the driver lib function from your start up code. If you want to use assembly, then I would suggest to first put the call in a C code and put a break point at the entry and inspect dis-assembly to understand how to write the function in assembly. You can also generate assembled code using one of the build options and inspect the compiler generated assembler code for the file.

    we don't have a direct assembly code in our libraries for disabling watchdog.

    Also, I don't think watchDOG is enabled by default on ARM side. Can you check the TRM and the boot ROM chapter of TRM? if watchDOG is enabled by boot ROM it will be shown in the boot flow diagram.

    Best Regards

    Santosh Athuru

  • I found the application was hanging on setting the clock up. I already do this in the bootloader so I removed it from the application.

    // Setup main clock tree for 75MHz - M3 and 150MHz - C28x
    // SysCtlClockConfigSet(SYSCTL_SYSDIV_1 | SYSCTL_M3SSDIV_2 | SYSCTL_USE_PLL |
    // (SYSCTL_SPLLIMULT_M & 0x0F));
  • Regis,

    Just wanted to know: In which step is it hanging?

    Thanks and regards,
    Vamsi
  • I step though the code and it was resetting at:
    SysCtlClockConfigSet(SYSCTL_SYSDIV_1 | SYSCTL_M3SSDIV_2 | SYSCTL_USE_PLL |
    (SYSCTL_SPLLIMULT_M & 0x0F));

    I removed this from the application and it runs as expected.
  • Regis,

    Can you step in and see which exact instruction is causing the reset for you?

    Thanks and regards,
    Vamsi
  • It might be SysCtlClockPllConfig(ClkSrcReq, (PllMult));
    Its a bit hard to debug.