cancel
Showing results for 
Search instead for 
Did you mean: 

Dropped GDB connection after STM32F373 Clock Configuration

kevinhuang
Associate II
Posted on June 13, 2014 at 19:33

Hello all,

I'm currently working with a custom board fitted with an STM32F373. I'm programming it using an STM32F3 Discovery board through the st-link-v2 interface. Previously, I was able to successfully connect with OpenOCD through my Sourcery CodeBench arm-none-eabi-gdb session and flash my project to it. I had written a basic program that would just flash some LEDs that I had wired into the board. Based on the rate of flashing, I determined that the MCU had started up using the HSI as its clock, rather than the PLL as I intended. Based on previous projects with similar hardware configurations, I set the HSEBYP bit in the RCC CR register, and then flashed the new image to the MCU. The image seems to have flashed correctly, but after resetting the MCU, the gdb connection dropped, and since then I haven't been able to connect to it. 

I think by having an improperly configured clock, openocd/gdb can't connect to the MCU. I've posted the openocd output that shows me attempting to connect to the MCU, then attempting to attach the gdb process to it 

http://hastebin.com/avuxosecor.vhdl

 

Is there a way for me to recover from this? Is it possible to clear the image on the MCU and then reattempt flashing to it? Also, I'm at a loss for what caused this error to begin with. The external circuitry is the same as previous projects that I've worked with, so I have my doubts that merely setting the HSEBYP bit would cause this error. I'm currently looking into the hardware setup to make sure that it's not a hardware issue, but until then it would be nice if someone could help me determine if it's a software issue and if I can recover from this. Thank you!

#clock #stm32f3
1 REPLY 1
Posted on June 13, 2014 at 20:02

Jumper BOOT0 high, reset, and the board should now be in System Loader mode instead of running broken user code. You should then be able to erase the code.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..