You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem:
When an app has been restarted via esp_restart(), the uart tx hardware fifo appears to contain some random bytes that are not immediately sent out.
What we did:
At startup uart_driver_install() is called and then followed by this 9-bytes test-sequence. uart_write_bytes(2, "\x11\x22\x33\x44\x54\x66\x77\x88\x99", 9);
During a normal power-up boot that sequence is seen at the UART-TX output.
The second line is a message of our protocol
After a esp_restart() initiated boot the same number of bytes are sent but have different values. Now the UART sends the test-sequence starting at byte #3 in the second line, which is part of our protocol. The protocol bytes start at byte #12. The message it too short, thus destroying our protocol.
Result: the byte protocol used in our application can't work anymore.
BF C1 55 74 70 93 DE 2D B2
6E 65 11 22 33 44 54 66 77 88 99 55 AA 01 FC 16 4C 01 20 33 73 54 65 72 6D 2D 46 39 38
Only re-applying power fixes this odd UART behaviour.
I ran into this problem after an OTA update that calls esp_restart()
Is there a way to reset the UART hardware and its FIFO?
Or better: How can a hardware reset be triggered via software?
I can't use any IO-port for it, as the hardware boards are already in production.
Why on earth does the UART TX-FIFO keep bytes without sending them?
Or is there a different reason?
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
resetting via esp_restart() does not flush UART hardware TX-FIFO
resetting via esp_restart() does not flush UART hardware TX-FIFO (IDFGH-4123)
Oct 16, 2020
ESP-IDF: v4.2-dev-994-gc9f29e0b5-dirty
Problem:
When an app has been restarted via esp_restart(), the uart tx hardware fifo appears to contain some random bytes that are not immediately sent out.
What we did:
At startup uart_driver_install() is called and then followed by this 9-bytes test-sequence.
uart_write_bytes(2, "\x11\x22\x33\x44\x54\x66\x77\x88\x99", 9);
During a normal power-up boot that sequence is seen at the UART-TX output.
The second line is a message of our protocol
After a esp_restart() initiated boot the same number of bytes are sent but have different values. Now the UART sends the test-sequence starting at byte #3 in the second line, which is part of our protocol. The protocol bytes start at byte #12. The message it too short, thus destroying our protocol.
Result: the byte protocol used in our application can't work anymore.
Only re-applying power fixes this odd UART behaviour.
I ran into this problem after an OTA update that calls esp_restart()
Is there a way to reset the UART hardware and its FIFO?
Or better: How can a hardware reset be triggered via software?
I can't use any IO-port for it, as the hardware boards are already in production.
Why on earth does the UART TX-FIFO keep bytes without sending them?
Or is there a different reason?
The text was updated successfully, but these errors were encountered: