[SR5E1E7 Custom Board] How to load program to FLASH?
Hello everyone,
I am bringing up a custom motor control inverter board based on the STEVAL-TTM001V1 evaluation kit. I am using StellarStudio, OpenOCD, and the Stellar Motor Control Tool Kit (MCTK with StellarESDK-1.7.0).
The Problem: My firmware runs perfectly when launched via a Debug session in StellarStudio. I can step through the code, initialize peripherals, and hit my main loop. However, if I disconnect the debugger and power-cycle the board (or press the physical Reset button), the application completely fails to start.
What I have verified so far:
-
Flash Linking: My linker script is correctly pointing to Flash (
core1_nvmat0x08000000). OpenOCD successfully flashes and reports** Verified OK **. -
The Trap Location: If I power-cycle the board, let it fail, and then hot-attach the debugger without resetting, I find the PC is trapped in an infinite assembly loop.
-
No Hardware Faults: While trapped in this loop, I checked the CFSR register (
0xE000ED28), and it reads0x00000000. This indicates no MemManage, Bus, or Usage faults occurred. It appears to be a software trap (likeError_HandlerorDefault_Handler).
My Question: Why would the SR5E1E7 successfully execute code when initialized by the OpenOCD debug sequence, but drop into a software trap during a standalone reset? Are there specific UTEST, Boot Assist Flash (BAF), STCU, or Watchdog configurations required in the ESDK to allow standalone booting on a custom SR5E1 board?
Any guidance on what the debugger is doing differently than the standalone bootloader would be greatly appreciated!
