AnsweredAssumed Answered

Dropped GDB connection after STM32F373 Clock Configuration

Question asked by mex1 on Jun 13, 2014
Latest reply on Jun 13, 2014 by Clive One
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 here. 

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!