Skip to content
Commit 26f7b8c9 authored by Michael Spahlinger's avatar Michael Spahlinger Committed by Gregory Nutt
Browse files

TWIHS Driver improved and GPIO-Driver fixed for Open-Drain Pins

 - sam_gpioread: Now the actual line level from the pin is read back.  This is extremely important for Open-Drain Pins, which can be used bidirectionally
 - Re-Implemented twi_reset-function and enhanced it so it can be called from inside the driver (see next point)
 - Glitch-Filter: Added a configuration option to enable the twi-built-in glitch filter
 - Added a "Single Master Mode": In EMC Testing the TWI-Bus got stuck because the TWI-Master detected a Multi-Master access (but there is no second master). With the option "Single Master" we detect these events and automatically trigger a twi_reset. We also do an automatic recovery if a slave got stuck (SDA stays low).

With the above changes I²C-Bus reliability in harsh environments (eg. EMC) is greatly improved.

The small change in the GPIO-Driver was necessary because otherwise you cannot read back the correct line status of Open-Drain Outputs and this is needed by the twi_reset function.
parent 315e22e4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment