2020-06-18 12:33 PM
Having a problem with our custom board not running code unless it is started with the debugger. We are currently using Segger J-link debugger together with ARM Keil uVision version 5.29 toolchain.
Everything runs fine when I have debugger attached and click debug run but when the debugger is removed nothing happens. I have attached part of our circuit showing "B00T0" and "RST" pin.
Many thanks in advance.
2020-06-18 12:58 PM
Schematic seems fine.
How do you know it's not running? As opposed to just stuck in a loop somewhere not doing anything useful?
You can attach the debugger to a program already running to determine where it's at.
2020-06-18 01:22 PM
Hi TDK thanks for the quick response. I am not sure I understand what you mean by "You can attach the debugger to a program ..." I am using Keil under Windows 10 and I can not seem to find an option to do what you are suggesting.
Currently to run the program I either click on the "Start/Stop Debug Session icon button or use Ctrl + F5 combo.
2020-06-18 01:39 PM
In CLion, I have the options "Download: None" and "Reset: None" when starting a debug session. These would attach to an already-running code. Keil has similar options, apparently:
http://www.keil.com/support/docs/3697.htm
2020-06-18 09:55 PM
I had a similar problem yesterday but different STM32 and not Segger....
It may be that the debugger is reading a register that needs reading ?
My issue was really weird in that I had to have my debugger looking at the ADC1 peripheral which would read the Data Register and
reset the OVR bit. Long story but maybe something like that ?
2020-06-19 01:24 PM
HI TDK,
Sorry for the late response and thanks for your reply and link, I think I have now been able to attach debugger to running code. Unfortunately it seem to go directly to the HardFault_Handler() function so I need to try and determine what was the reason why it end up there.
2020-06-19 01:27 PM
Hi Gudgel.boB,
Thanks for your reply. However I am not sure I understand what you are trying to describe. Thanks.