You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/09/14 18:07:27 UTC

[GitHub] benmccrea opened a new pull request #1400: [DO NOT MERGE] - Fix BQ27Z561 and LP5523 I2C repeated-stop operations

benmccrea opened a new pull request #1400: [DO NOT MERGE] - Fix BQ27Z561 and LP5523 I2C repeated-stop operations
URL: https://github.com/apache/mynewt-core/pull/1400
 
 
   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. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services