2019-12-02 03:57 AM
Hi,
I have a NUCLEO-L412KB board, debugging with Segger embedded studio. Since it is not possible to connect the Segger debugger box to the board (SWD is not connected to connectors) I used the on board ST-Link as J-Link (converted with programme STLinkReflash.exe). This works well with the Segger software.
But if I finish the debugger, the program will not start alone, even if I made a (USB) power supply reset or press the reset button.
The same if I do "Restore ST-Link" and the create the original state of the integrated ST link. No change of the problem.
I already updated the integrated ST-Link to V2.J35.M26 with ST-LinkUpgrade.exe. Does not change anything.
Also keeping integrated ST-Link in reset mode (short circuit C4) does change anything.
I also tried supply with other voltage instead of USB connector:
* 5V to VIN (CN4-1): no change
* 3,3V on VDD (JP1 open): no change
Why is the microcontroller not starting without debugger?
Best regards
Martin
2019-12-02 09:01 AM
>>Why is the microcontroller not starting without debugger?
It probably is starting. Unless you have BOOT set to something odd it should start your code, and then probably crashes and dies.
Instrument Hard Fault and Error Handler so you know if it found its way there.
Make sure you initialize all pins/clocks you need, don't rely on the debugger to do this. Pay special attention to GPIOA
Code might execute faster without the debugger, check timeouts are adequate.
Get a GPIO or UART working early, ideally in Reset_Handler, and output some signs of life indicating your code is in fact running.
2019-12-02 11:15 AM
Perhaps some print to SWO is avtivated.