2016-04-03 02:20 PM
Hi everyone,
I wonder exactly what the debugger is doing when I attach it with gdb. What is the big difference between running with debugger and without debugger?Does it use its own startup code ?Does it do stuff with clock registers ?Different entry point ?Etc...I have st-link v2 debugger and the reason for asking is that my sdram stops working when outside debugger (attach it once in gdb and just quit gdb makes the board restart and then makes the sdram work as well).Regards,Troy18182016-04-03 02:32 PM
1. Not GDB but OpenOCD,
2. Usualy in cfg file are implemented enabling HSI. 3. In step mode debugging OCD disable/enables interrupt. 4 In connection debugger checks rev id and so on. I newer have problems likes yours.2016-04-04 12:49 PM
Thanks for answering.
I figured out what the problem was.It seems that the debugger (or software controlling debugger) is turning on clock for gpio port C (stm32f756xx). My code did not properly activate the clock for this particular port at the time the sdram was configured. For me this meant that FMC_SDNE0 and FMC_SDCKE0 was set to input pins when the sdcard was configured. This is of course not a good thing and lead to an uninitialized sdram in the case where the debugger was not used.Regards,Mathias2016-04-05 12:09 AM
Debuger DON'T do anything with ports.
Check program. Do not trust ST.