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 Dec 2, 2024
1 parent 979d1a8 commit 57f2e1a
Show file tree
Hide file tree
Showing 6 changed files with 109,996 additions and 108,758 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,5 +1,11 @@
/* == "version" + "Realtek git version" + "compile date" + "compile time" == */

== version eb5103aa31 2024/11/28-16:29:52 ==
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 33dff5bd62 2024/11/26-11:42:59 ==
1. Optimize probe response frequency in wifi driver

Expand Down
Loading

0 comments on commit 57f2e1a

Please sign in to comment.