Commit f43c08f
committed
bsp: mcxn947: fix dead console RX on LPUART
LPUART_Init re-ran LP_FLEXCOMM_Init on every configure, resetting the
peripheral and wiping CTRL.RIE set by RT_DEVICE_CTRL_SET_INT, so the
console never received a byte and host-side VCOM writes wedged.
Verified on FRDM-MCXN947 hardware via GDB: NVIC ISER never armed and a
hardware breakpoint on uart_isr never fired until these changes.
- define LPFLEXCOMM_INIT_NOT_USED_IN_DRIVER=1 so fsl drivers stop
re-initialising the FlexComm on every configure
- select FlexComm function once in rt_hw_flexcomm_mode_init()
- preserve/restore RX interrupt enable across LPUART_Init (PR #11186)
- clear OR/FE/NF/PF in uart_isr: an uncleared overrun inhibits all
further LPUART reception
Reintroduces the drv_uart.c fix from #11186 (reverted in #11191),
combined with the one-time FlexComm mode selection that makes it safe.
Signed-off-by: Alexander Salas Bastidas <ajsb85@firechip.dev>1 parent b245c18 commit f43c08f
3 files changed
Lines changed: 62 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
164 | 175 | | |
165 | 176 | | |
166 | 177 | | |
| |||
248 | 259 | | |
249 | 260 | | |
250 | 261 | | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
251 | 268 | | |
252 | 269 | | |
253 | 270 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
37 | 79 | | |
38 | 80 | | |
39 | 81 | | |
40 | 82 | | |
41 | 83 | | |
42 | 84 | | |
43 | 85 | | |
| 86 | + | |
44 | 87 | | |
45 | 88 | | |
46 | 89 | | |
| |||
0 commit comments