Skip to content

Commit

Permalink
os/arch/arm/src/amebasmart: Fix UART data loss when wakeup from PG
Browse files Browse the repository at this point in the history
Issue is encountered where bytes are lost on UART wakeup source during resume from sleep

Test Requirements:
Please ensure PR #6482 is applied before testing

Analysis:
- UART FIFO is started but not drained during resume. When the peripheral is initialized again, it causes the FIFO to also be cleared and cause data loss
- Similarly if more than 64 bytes is passed in together, since there is no mechanism to drain the FIFO into RAM it will cause LSR overrun error

This fix drains the FIFO first at KM4, then again at CA32 until it fully wake, then normal Tizen ISR handler resume operation
- The drained buffer is also passed to application layer
- Watchdog is used to monitor UART1 until the FIFO is completely drained
  • Loading branch information
lhenry-realtek committed Nov 25, 2024
1 parent 8b183fc commit d2fc335
Show file tree
Hide file tree
Showing 6 changed files with 109,994 additions and 108,751 deletions.
Binary file modified build/tools/amebasmart/gnu_utility/km0_km4_app.bin
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
/* == "version" + "Realtek git version" + "compile date" + "compile time" == */

== version 9b81db97cd_2024/11/22-22:36:20 ==
== version 270d96dbec_2024/11/25-16:44:23 ==
1. Fix UART1 Data Loss when send large data to wakeup device
- Add IPC to handle startup of UART1 when CA32 is entering suspend
- UART1 interrupt to KM4 is disabled as when CA32 is fully started, ISR will be serviced by CA32's ISR instead
- Add WFE state check for CA32 as it suspends, as there is some instability on registers during rapid wakeup/sleep causing lockup

== version 9b81db97cd 2024/11/22-22:36:20 ==
1. WiFi firware supports two RA mechanism currently
-Switch to another one.

Expand Down
Loading

0 comments on commit d2fc335

Please sign in to comment.