2021-07-30 09:00 AM
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:
Solved! Go to Solution.
2021-07-31 03:44 PM
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 .
2021-07-30 09:10 AM
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.
2021-07-31 03:44 PM
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 .