Skip to content

Commit

Permalink
RP2040: Fix I2C lockups and improve error handling
Browse files Browse the repository at this point in the history
Problem:

* in edge-case scenarios the tx empty interrupt was still enabled after a
  transmission was finished. This would lead to endless interrupt tail
  chaining that completely starved the system.

Solution:

* all irqs are now disabled at the end of a transaction by default

Error handling:

* all error condition irqs like over and underruns of tx and rx fifos
  are now enabled and handled with an wake-up of the sleeping thread
  plus disabling of all irqs

Optimizations:

* irq status register is only read once for evalutation in the irq
  handler
* better utilization of the rx fifos during reception, which are now only
  read if all data has been successfully received.
  • Loading branch information
KarlK90 committed Jul 26, 2022
1 parent 3d85866 commit 3488d04
Show file tree
Hide file tree
Showing 2 changed files with 319 additions and 132 deletions.
Loading

0 comments on commit 3488d04

Please sign in to comment.