Shifting 1 by 31 is undefined behaviour because 1 is signed.
We should probably use 1ul instead of 1 everywhere else,
but for now this silences a compiler warning.
- Bugfix: stdfilters didn't work because the filter was never enabled (wrong number of bits to shift)
- Bugfix: Filters were never used because the configuration register cannot be written without using the initialization mode
Both bugs are fixed by this patch. Filtering has been tested with both standard and extended identifiers and is now working properly.
Remove proxy #defines
Ensure the LSE(ON) etal are set and remembered in
a) A cold start (RTC_MAGIC invalid) of the RTC
b) A warm start (RTC_MAGIC valid) of the RTC but a clock change.
The change was needed because in bench testing a merge of the latest's STM32 53ec3ca (and friends) it became apparent that the
Sequence of operation is wrong in the reset of the Backup Domain in the RCC code. PWR is required before the Backup Domain
can be futzed with. !!!This Code should be tested on STM32 and if needed rippled to the STM32 families
- 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.