Skip to content

Commit cea91b2

Browse files
committed
[stm32] Fix interrupt loop for uart with tx buffer but no rx buffer
The RXNE interrupt was also enabled if only tx was buffered. The controller gets stuck in an endless loop because the flag is never acknowledged in the ISR.
1 parent e7d5192 commit cea91b2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/modm/platform/uart/stm32/uart.hpp.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ public:
7070
{{ hal }}::initialize<SystemClock, baudrate, tolerance>(parity, length);
7171
%% if buffered
7272
{{ hal }}::enableInterruptVector(true, 12);
73+
%% endif
74+
%% if options["buffer.rx"]
7375
{{ hal }}::enableInterrupt(Interrupt::RxNotEmpty);
7476
%% endif
7577
{{ hal }}::setTransmitterEnable(true);

0 commit comments

Comments
 (0)