Skip to content

Commit

Permalink
UART instability fix with high interrupt load (commaai#283)
Browse files Browse the repository at this point in the history
* Fixed UART overrun error

* Added stability test scripts

* Refactored UART code. ESP/GPS now uses DMA in circular mode to directly write into the ring buffer, saving a bunch of interrupts and potential race conditions.

* Changed stability test to use amount of bytes instead of amount of non-zero messages, since the ring buffer pointer is only updated on half or full DMA transfer or on line idle (e.g. no more 1 char messages from the gps)

* Increase data limit. It's too low sometimes in normal operation

* Forgot to set write pointer in ring buffer

* Increased test limit even more
  • Loading branch information
robbederks authored Oct 4, 2019
1 parent 9a9e9d4 commit 9486836
Show file tree
Hide file tree
Showing 6 changed files with 446 additions and 181 deletions.
1 change: 1 addition & 0 deletions board/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define PANDA_CONFIG_H

//#define DEBUG
//#define DEBUG_UART
//#define DEBUG_USB
//#define DEBUG_SPI

Expand Down
Loading

0 comments on commit 9486836

Please sign in to comment.