Commit 07f4de2
Jira 842 UART improvement, PR 266, broke BLE interface.
Root causes:
1. The uart_fifo_fill doesn't check the FIFO's length
and failed to send out all data.
2. Check the FIFO status register before write data
in FIFO.
3. Ring buffer pointer variables are not volatile and
polling mechanism failed to examine the actual
pointer value being update by foreground task.
File changes:
1. RingBuffer.h: Make pointer as volatile.
2. UARTClass.cpp: Added checking of FIFO size for
data Tx.
3. ns16550.c: Added routines to h/w status register
checking.1 parent 6d22f3d commit 07f4de2
File tree
3 files changed
+43
-21
lines changed- cores/arduino
- system/libarc32_arduino101/drivers
3 files changed
+43
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
35 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
| 171 | + | |
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
187 | | - | |
| 186 | + | |
188 | 187 | | |
189 | 188 | | |
190 | 189 | | |
| |||
201 | 200 | | |
202 | 201 | | |
203 | 202 | | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
210 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
211 | 215 | | |
212 | 216 | | |
213 | | - | |
214 | | - | |
| 217 | + | |
| 218 | + | |
215 | 219 | | |
216 | | - | |
217 | | - | |
218 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
219 | 226 | | |
220 | 227 | | |
221 | 228 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
343 | | - | |
| 343 | + | |
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
| |||
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
| 355 | + | |
| 356 | + | |
355 | 357 | | |
356 | 358 | | |
357 | 359 | | |
| |||
362 | 364 | | |
363 | 365 | | |
364 | 366 | | |
365 | | - | |
366 | | - | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
367 | 370 | | |
368 | 371 | | |
369 | 372 | | |
| |||
622 | 625 | | |
623 | 626 | | |
624 | 627 | | |
625 | | - | |
626 | 628 | | |
627 | 629 | | |
628 | 630 | | |
| |||
641 | 643 | | |
642 | 644 | | |
643 | 645 | | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
644 | 659 | | |
645 | 660 | | |
646 | 661 | | |
| |||
0 commit comments