Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-esp32
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
arduino-esp32
Commits
12ca9e8b
Commit
12ca9e8b
authored
Jul 03, 2018
by
chemicstry
Committed by
Me No Dev
Jul 03, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Port UART reset fix from ESP-IDF (#1408)
parent
8b01b9e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
cores/esp32/esp32-hal-uart.c
cores/esp32/esp32-hal-uart.c
+7
-4
No files found.
cores/esp32/esp32-hal-uart.c
View file @
12ca9e8b
...
...
@@ -315,11 +315,14 @@ void uartFlush(uart_t* uart)
UART_MUTEX_LOCK
();
while
(
uart
->
dev
->
status
.
txfifo_cnt
);
uart
->
dev
->
conf0
.
txfifo_rst
=
1
;
uart
->
dev
->
conf0
.
txfifo_rst
=
0
;
//Due to hardware issue, we can not use fifo_rst to reset uart fifo.
//See description about UART_TXFIFO_RST and UART_RXFIFO_RST in <<esp32_technical_reference_manual>> v2.6 or later.
// we read the data out and make `fifo_len == 0 && rd_addr == wr_addr`.
while
(
uart
->
dev
->
status
.
rxfifo_cnt
!=
0
||
(
uart
->
dev
->
mem_rx_status
.
wr_addr
!=
uart
->
dev
->
mem_rx_status
.
rd_addr
))
{
READ_PERI_REG
(
UART_FIFO_REG
(
uart
->
num
));
}
uart
->
dev
->
conf0
.
rxfifo_rst
=
1
;
uart
->
dev
->
conf0
.
rxfifo_rst
=
0
;
UART_MUTEX_UNLOCK
();
}
...
...
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