You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/09/28 03:50:46 UTC

[GitHub] [incubator-nuttx] btashton opened a new pull request #1907: nRF52: Add basic error handling for i2c in polling mode

btashton opened a new pull request #1907:
URL: https://github.com/apache/incubator-nuttx/pull/1907


   ## Summary
   Add basic error handling for i2c in polling mode.
   
   There was no error handling before and it would block on common cases like NACK which meant that you could not use the i2ctool to perform a scan of the bus.
   
   This does not handle the interrupt flow which also has incomplete error handling.
   
   ## Impact
   If `CONFIG_I2C_POLLED` is used unexpected NACKs no longer block the I2C bus forever.  This means that you can use the i2ctool to scan for a range of devices that do no exist and not lock the bus.
   
   ## Testing
   This was tested by scanning the full i2c address space for devices with only 4 devices 
   ```
   NuttShell (NSH) NuttX-9.1.0
   nsh> i2c dev -b 1 0x00  0x7f
        0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
   00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
   10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- 1e 1f
   20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
   30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- --
   40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
   50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
   60: 60 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
   70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [incubator-nuttx] acassis commented on pull request #1907: nRF52: Add basic error handling for i2c in polling mode

Posted by GitBox <gi...@apache.org>.
acassis commented on pull request #1907:
URL: https://github.com/apache/incubator-nuttx/pull/1907#issuecomment-699977893


   Thanks Brennan! LGTM


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [incubator-nuttx] acassis merged pull request #1907: nRF52: Add basic error handling for i2c in polling mode

Posted by GitBox <gi...@apache.org>.
acassis merged pull request #1907:
URL: https://github.com/apache/incubator-nuttx/pull/1907


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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