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.
Showing
- arch/arm/Kconfig 1 addition, 0 deletionsarch/arm/Kconfig
- arch/arm/src/samv7/Kconfig 69 additions, 0 deletionsarch/arm/src/samv7/Kconfig
- arch/arm/src/samv7/sam_gpio.c 4 additions, 8 deletionsarch/arm/src/samv7/sam_gpio.c
- arch/arm/src/samv7/sam_twihs.c 173 additions, 57 deletionsarch/arm/src/samv7/sam_twihs.c
Loading
Please register or sign in to comment