b05430cfd9
* ReSTART fix, Sequencing fix pr #1665 introduce a problem with ReSTART, when solving this problem I found an interaction between the TxFifo refill, RxFifo empty and CMD[] fill. during certain sequences a dataqueue command would be skipped, this skipping resulted in a mismatch between the contents of the TxFifo and the i2c command sequence. The problem manifested as an ACK error. In addition to this required bug fix I propose: * `Wire.begin()` be changed from a `void` to a `bool` this will allow the reset functionality of `Wire.begin()` to be reported. Currently `Wire.begin()` attempts to reset the i2c Peripheral, but cannot report success/failure. * `Wire.busy()` be added. this `bool` function returns the hardware status of the bus. This status can be use in multi-master environments for application level interleaving of commands, also in single master environment, it can be used to detect a 'hung' bus. With the functional change to `Wire.begin()` this allows app level recover of a hung bus. * `Wire.lastError()` value updated for all errors, previously when interleaving `Wire.endTransmission(false)` and `Wire.readTransmission(false)`, the 128 byte `Wire.write()` buffer was exhausted without generating and error(very exotic). I discovered this error when I created a sequence of directed reads to a EEPROM. Each directed read used 2 bytes of the 128 byte `write()` buffer, so after 64 consecutive ReSTART writes with ReSTART reads, `Wire()` had no room to record the directed address bytes. It generated just a NAK check without setting the EEPROMs internal register address. The succeeding ReSTART read succeeded at incorrect address. * Changes to the HAL layer: ** added `i2cGetStatus()` which returns the i2c peripheral status word, used to detect bus_busy currently ** added `i2cDebug()` programmatic control of debug buffer output ** changed `i2cAddQueue()` to allow data_only queue element this will allow a i2c transaction to use multiple data pointers. ** removed direct access to DumpInts(), DumpI2c() from app, use i2cDebug() to set trigger points * * Update esp32-hal-i2c.c * Update Wire.cpp * ReSTART, Sequencing pr #1665 introduce a problem with ReSTART, when solving this problem I found an interaction between the TxFifo refill, RxFifo empty and CMD[] fill. during certain sequences a dataqueue command would be skipped, this skipping resulted in a mismatch between the contents of the TxFifo and the i2c command sequence. The problem manifested as an ACK error. In addition to this required bug fix I propose: * `Wire.begin()` be changed from a `void` to a `bool` this will allow the reset functionality of `Wire.begin()` to be reported. Currently `Wire.begin()` attempts to reset the i2c Peripheral, but cannot report success/failure. * `Wire.busy()` be added. this `bool` function returns the hardware status of the bus. This status can be use in multi-master environments for application level interleaving of commands, also in single master environment, it can be used to detect a 'hung' bus. With the functional change to `Wire.begin()` this allows app level recover of a hung bus. * `Wire.lastError()` value updated for all errors, previously when interleaving `Wire.endTransmission(false)` and `Wire.readTransmission(false)`, the 128 byte `Wire.write()` buffer was exhausted without generating and error(very exotic). I discovered this error when I created a sequence of directed reads to a EEPROM. Each directed read used 2 bytes of the 128 byte `write()` buffer, so after 64 consecutive ReSTART writes with ReSTART reads, `Wire()` had no room to record the directed address bytes. It generated just a NAK check without setting the EEPROMs internal register address. The succeeding ReSTART read succeeded at incorrect address. * Changes to the HAL layer: ** added `i2cGetStatus()` which returns the i2c peripheral status word, used to detect bus_busy currently ** added `i2cDebug()` programmatic control of debug buffer output ** changed `i2cAddQueue()` to allow data_only queue element this will allow a i2c transaction to use multiple data pointers. ** removed direct access to DumpInts(), DumpI2c() from app, use i2cDebug() to set trigger points * * Forgot DebugFlags Return @andriyadi found this, total brain fade on my part. |
||
---|---|---|
.. | ||
libb64 | ||
Arduino.h | ||
base64.cpp | ||
base64.h | ||
binary.h | ||
cbuf.cpp | ||
cbuf.h | ||
Client.h | ||
esp32-hal-adc.c | ||
esp32-hal-adc.h | ||
esp32-hal-bt.c | ||
esp32-hal-bt.h | ||
esp32-hal-dac.c | ||
esp32-hal-dac.h | ||
esp32-hal-gpio.c | ||
esp32-hal-gpio.h | ||
esp32-hal-i2c.c | ||
esp32-hal-i2c.h | ||
esp32-hal-ledc.c | ||
esp32-hal-ledc.h | ||
esp32-hal-log.h | ||
esp32-hal-matrix.c | ||
esp32-hal-matrix.h | ||
esp32-hal-misc.c | ||
esp32-hal-psram.c | ||
esp32-hal-psram.h | ||
esp32-hal-sigmadelta.c | ||
esp32-hal-sigmadelta.h | ||
esp32-hal-spi.c | ||
esp32-hal-spi.h | ||
esp32-hal-time.c | ||
esp32-hal-timer.c | ||
esp32-hal-timer.h | ||
esp32-hal-touch.c | ||
esp32-hal-touch.h | ||
esp32-hal-uart.c | ||
esp32-hal-uart.h | ||
esp32-hal.h | ||
esp8266-compat.h | ||
Esp.cpp | ||
Esp.h | ||
HardwareSerial.cpp | ||
HardwareSerial.h | ||
IPAddress.cpp | ||
IPAddress.h | ||
IPv6Address.cpp | ||
IPv6Address.h | ||
main.cpp | ||
MD5Builder.cpp | ||
MD5Builder.h | ||
pgmspace.h | ||
Print.cpp | ||
Print.h | ||
Printable.h | ||
Server.h | ||
stdlib_noniso.c | ||
stdlib_noniso.h | ||
Stream.cpp | ||
Stream.h | ||
StreamString.cpp | ||
StreamString.h | ||
Udp.h | ||
WCharacter.h | ||
wiring_private.h | ||
wiring_pulse.c | ||
wiring_shift.c | ||
WMath.cpp | ||
WString.cpp | ||
WString.h |