cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Wire debug problems

HAbay.1
Associate III

I'm working on a low power project using the Stm32f103 (blue pill) and I've been having problems, which I'm pretty sure are related to Serial wire debug , I am using a low frequency ( 256 pre-scaler) to save power on the HCLK , and every time I attempt to Debug ( after pressing Reset since I'm using openocd with this bluepill clone that I unfortunately cannot return at the moment) I get these errors:

Error: Failed to enable the FPB

Polling target STM32F103C8Tx.cpu failed, trying to reexamine

Examination failed, GDB will be halted. Polling again in 100ms

Polling target STM32F103C8Tx.cpu failed, trying to reexamine

Examination failed, GDB will be halted. Polling again in 100ms

Polling target STM32F103C8Tx.cpu failed, trying to reexamine

Examination failed, GDB will be halted. Polling again in 100ms

Polling target STM32F103C8Tx.cpu failed, trying to reexamine

Examination failed, GDB will be halted. Polling again in 300ms

Polling target STM32F103C8Tx.cpu failed, trying to reexamine

Examination failed, GDB will be halted. Polling again in 300ms

and it keeps trying to examine.

In addition, I also get this warning in SYS mode and configuration : This peripheral has no parameters to be configured .

final note: This board does work, I used it before on other small projects.

here are the photos of my current configuration:0693W00000D18TZQAZ.png0693W00000D18RiQAJ.png0693W00000D18ROQAZ.png

1 ACCEPTED SOLUTION

Accepted Solutions

Fortunately , I was able to fix this issue by simply raising the HCLK frequency to anything above 125KHZ since that was the lowest you can achieve on a blue pill according to the datasheet .

View solution in original post

2 REPLIES 2

Debugging can be an issue in low power modes if the portions of the chip are turned off.

At low speeds you might also need to drop the connection speed (SWCLK) also.

Providing connectivity of NRST provides for the ability to "connect under reset"

I might suggest doing debugging at more normal speeds, and get some interfacing via a USART so you can output diagnostic information in a less invasive fashion to understand real-time behaviour and flow, and low power operation.

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

Fortunately , I was able to fix this issue by simply raising the HCLK frequency to anything above 125KHZ since that was the lowest you can achieve on a blue pill according to the datasheet .