Description
Describe the bug
When sending large amounts of data over Serial Monitor (string len > 204 ), the processor enters a hard fault.
Hard fault status register (SCB_HFSR) 0xE000ED2C has bit 30 set to 1 (FORCED: Forced hard fault, 1: Forced hard fault.)
Configurable fault status register (SCB_CFSR) 0xE000ED28 has bit 10 set to 1 (IMPRECISERR: Imprecise data bus error)
To Reproduce
On the latest 2.0.0 core
- Upload the following minimal Arduino sketch to the board as usual
void setup() {
Serial.begin(9600);
}
void loop (void) {
if (Serial.available()) Serial.print((char)Serial.read());
}
- Connect using the serial monitor and send the following
One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin. He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections. The bedding was hardly able to cover it and seemed ready to slide off any moment. His many legs, pitifully thin compared with the size of the rest of him, waved about helplessly as he looked. "What's happened to me?" he thought.
Expected behavior
The text is written back in the Serial monitor.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Linux 5.12.5-arch1-1
- Arduino IDE version: 1.8.15
- STM32 core version: 2.0.0
- Tools menu settings if not the default: USB Support: CDC Supersede Serial
- Upload method: STM32CubeProgrammer(SWD)
Board (please complete the following information):
- Name: BluePill STM32F103C8T6 Medium-density with 128K Flash
- Hardware Revision: Rev X/ N/A
Additional context
I have bisected this git repository and identified the issue as originating in commit 00acff6 by @fpistm which updated the HAL Drivers to v1.1.5 for STM32f1xx. The commit before 242671d using HAL v1.1.4 works perfectly as expected.
I attach three screenshots showing the hard fault, the frozen serial monitor, and the working behaviour.