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.
Hello,
I'm using mcu_plus_sdk_am263px_09_01_00_20. I imported the project 'rti_led_blink_am263px-cc_r5fss0-0_nortos_ti-arm-clang'.
Issue 1: In SYSCONFIG, the 'GPIO_LED' is wrongly allocated. You have to change OSPI0_CSn0/P1 to LIN2_TXD/A8. After this change, the LED will blink.
Issue 2: I can run the program only once.
By this I mean:
- After Suspend, then Restart, the program runs to HwiP_undefined_handler()
- After Suspend, Reset, then Restart, the program runs to main() but then Resuming, the program runs to HwiP_data_abort_handler_c().
The only way to recover and restart the program is to Reset then (Re)Load the program.
a) Why can't the program be Restarted please?
b) How can I avoid having to load the program every time I want to run it from the beginning (0x00000000) please?
Thank you.
Hi Kier,
https://dev.ti.com/tirex/explore/node?node=A__AKM3smmsVVn7tYZAiWfuSA__AM26X-ACADEMY__t0CaxbG__LATEST
Regards,
Brennan
the program must be re-loaded each time to the device and executed each time.
Hi Brennan,
Yes but why? That is question 2a.
As far as I know, the program should still exist in RAM after the Restart button is pressed and the PC is simply reset to 0x0. Nothing, in principle, has changed since the first execution. In fact I confirmed (via Memory Browser -> Save Memory) that the .vectors and .text sections of the program are unchanged.
What is it that forces the loading of the same program into RAM every time I need to run the program?
This is key to understanding how this device works.
After more investigation I found the probable cause.
Scenario 1: After Suspend, then Restart, the program runs to HwiP_undefined_handler()
After Restart, the reset vector correctly points to _c_int00() however I spotted that the CPU mode is THUMB mode whereas after Program Load, the mode is ARM. I guess the reset vector instruction is incorrectly interpreted and causes the undefined instruction exception.
This means the Reset button should be pressed to change the mode back to ARM.
After Suspend:
After program Load and Reset:
Scenario 2: After Suspend, Reset, then Restart, the program runs to main() but then Resuming, the program runs to HwiP_data_abort_handler_c().
Weirdly I can't reproduce this problem today.
Conclusion:
So in summary it is possible to run a program more than once in DevBoot mode without reloading it. You just need to hit Reset (and optionally Restart) to change the mode back to ARM before executing the reset vector instruction.