Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
micropython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
micropython
Commits
7b5bf5f6
Commit
7b5bf5f6
authored
Mar 29, 2019
by
Damien George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stm32/uart: Handle correctly the char overrun case of RXNE=0 and ORE=1.
Fixes issue #3375.
parent
2848a613
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
ports/stm32/uart.c
ports/stm32/uart.c
+10
-0
No files found.
ports/stm32/uart.c
View file @
7b5bf5f6
...
...
@@ -745,6 +745,16 @@ void uart_irq_handler(mp_uint_t uart_id) {
}
}
}
// If RXNE is clear but ORE set then clear the ORE flag (it's tied to RXNE IRQ)
#if defined(STM32F4)
else
if
(
self
->
uartx
->
SR
&
USART_SR_ORE
)
{
(
void
)
self
->
uartx
->
DR
;
}
#else
else
if
(
self
->
uartx
->
ISR
&
USART_ISR_ORE
)
{
self
->
uartx
->
ICR
=
USART_ICR_ORECF
;
}
#endif
// Set user IRQ flags
self
->
mp_irq_flags
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment