#816
Target
STM32F103
Toolchain:
Compiled using PlatformIO 3.3.0
ststm32 @ 1.8.1
framework-mbed @ 3.137.0
tool-stlink @ 1.10200.0
Expected behavior
The following code should produce a square wave on pin PA_8:
#include "mbed.h"
DigitalOut output_pin(PA_8);
Ticker ticker;
void ticker_fn(){
output_pin = !output_pin;
}
int main(){
ticker.attach_us(ticker_fn, 500);
}
Actual behavior
Periodically, the ticker will freeze for 65ms, as shown in the screenshots below.
Immediately following a freeze, all missed interrupts are triggered in a short burst.
Some digging reveals similarities to issue #816, though I am unsure how to tackle the problem.
Steps to reproduce
The bug occurs on a generic "blackpill" STM32F103 board.
The example above was compiled using the following platformio.ini config file:
[platformio]
env_default = stm32f103c8t6
[env:stm32f103c8t6]
platform = ststm32
framework = mbed
board = nucleo_f103rb
upload_protocol = stlink
cc @bcostm @adustm @LMESTM @jeromecoutant
I thought this issue was solved a long time ago. But I have checked it again on NUCLEO_F103RB (using mbed v140) and I confirm the problem.
@cesarvandevelde @bcostm will be fixed with #4424
ST_TO_BE_CLOSED
Most helpful comment
@cesarvandevelde @bcostm will be fixed with #4424