The main part of this PR is a possible fix for an I2C failure in our nRF52 
system which hangs the bus and keeps SDA low indefinitely. The failure appears 
to be triggered when doing a read of bq27561 or lp5523 registers, if the write 
operation (first part of a write-read) fails and no STOP condition gets 
generated.

The solution applied by this PR is to allow the following I2C read and STOP 
condition to go through even though the write has failed. 

This fix is preliminary and testing is on going, though I want to submit it now 
for review and comments. A more thorough solution might be found by modifying 
hal_i2c_master_write in the nrf52xxx HAL to place a STOP on the bus if the 
write operation fails when the >last_op< argument is 0.

I've also reduced the bq27z561 i2c timeout has been reduced from 1 second to 16 
milliseconds, as the long timeout was holding up processing of default queue 
events. 

[ Full content available at: https://github.com/apache/mynewt-core/pull/1400 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to