2014-01-16 07:40 AM
I have a STM32F415VG which I have on my own board. The program code all runs when I have my SW debug adapter hooked up, but if I try to run the program without the adapter connected, nothing works. My oscillator doesn't even start up. Feels like there should be pull-ups or pull-downs on some of my debug pins, but the documentation all says that they're all done internally. Anyone know what might be the issue?
Cheers!2014-01-16 07:57 AM
What tool chain, SWD adaptor etc. are you using?
2014-01-16 08:03 AM
Hi
Are you running in RAM? When you debug - check the program counter. If it is in 0x2000000 region - you are loading and running your code in RAM2014-01-16 09:24 AM
I guess you'd want to check what BOOTx are set too.
Then you might want to look at the startup code, perhaps setting some GPIO to represent where you are, or output characters from a USART. These things can be done in assembler, if required. Have some sort of indicator in the Hard Fault routine so you can see if it ends up there. Ideally outputting diagnostic info via a serial port. Have some check-points within SystemInit(), to see if it's stuck in a loop waiting for a clock to start, or PLL to lock.2014-01-17 01:21 PM
I have seen something similar with a JTAG programmer on a board that I was working on. The programmer would assert the reset if it was not powered (plugged into USB), and prevent the MCU from booting. The board was designed to use the JTAG hardware reset, so it was a problem. The solution was to disconnect the JTAG HW reset line and rely on the JTAG SW reset functionality.
2014-01-20 12:42 AM
Putting a 47k pull down resistor on the SWCLK line fixed the issue!