Program doesn't run with Debug detached
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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!- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-01-16 07:57 AM
What tool chain, SWD adaptor etc. are you using?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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 RAM- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-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.Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-01-20 12:42 AM
Putting a 47k pull down resistor on the SWCLK line fixed the issue!