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/12/07 21:19:57 UTC

[GitHub] benmccrea opened a new pull request #1559: [Do Not Merge] - Change HAL I2C driver to use TWIM+EasyDMA

benmccrea opened a new pull request #1559: [Do Not Merge] - Change HAL I2C driver to use TWIM+EasyDMA
URL: https://github.com/apache/mynewt-core/pull/1559
 
 
   This PR is a first draft of a TWIM-EasyDMA driver for I2C, which uses interrupts and an OS semaphore to provide non-blocking capability. 
   
   Some improvements will be required before it is ready to merge. The OS semaphore should probably not reside in the driver, but instead the driver should provide for registering 1 or more callbacks so that a semaphore or other synchronization mechanism may reside in a higher layer such as the bus driver. 
   
   A decision will need to be made about whether this driver is added along side the existing blocking TWI driver, or should become a replacement for it. Since the nRF51 has only the TWI, it probably makes sense to keep some version of driver for both TWI and TWIM. How that gets implemented is TBD.
   
   **Known Issues:**
   * A single I2C timeout will happen on the first access after the LP5523 is reset, and once before the pod remove and pod insert animations. These timeouts might also exist with the existing TWI driver.
   * A single I2C timeout happens after the bq27x561 is enabled. This might also exist with the TWI driver.
   * I2C timeout errors are displayed using <console_printf>. This is temporary debug code. 
   * The code expects the bus driver to be enabled and won't build with <BUS_DRIVER_PRESENT: 0>
   * The workaround for TWIM Anomaly 109 is not implemented. To my knowledge, this anomaly should only appear if PPI is configured to start TWIM transactions. We don't use PPI with TWIM, so a workaround shouldn't be needed.
   * The TWI driver uses a workaround that disables/enables the TWI peripheral if it becomes unresponsive. This workaround has been left in place for now (and should do no harm), though the TWIM may not require it. 

----------------------------------------------------------------
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