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/19 16:44:57 UTC

[GitHub] andrzej-kaczmarek opened a new pull request #1575: [WIP] hw/bus: Add I2C bus driver for nRF52xxx TWIM (DMA)

andrzej-kaczmarek opened a new pull request #1575: [WIP] hw/bus: Add I2C bus driver for nRF52xxx TWIM (DMA)
URL: https://github.com/apache/mynewt-core/pull/1575
 
 
   This adds optimized I2C bus driver which can be used with nRF52xxx MCUs instead of default `i2c_hal` driver.
   
   The difference here is that it uses TWIM instead of TWI which means it uses DMA for transfer in the background and is synchronized by semaphore instead of using busy loops. This allows other tasks to execute while transfer is ongoing.
   
   Driver can be automatically enabled with new syscfg in MCU package:
       `MCU_BUS_DRIVER_I2C_USE_TWIM: 1`
   
   The only limitation here compared to `i2c_hal` driver is that it's not possible to make a read operation with `NOSTOP` flag. This is due to missing shortcut in TWIM peripheral to trigger `TASK_SUSPEND` on `EVENT_LASTRX`. It would be possible to workaround this with PPI, however I do not think read with NOSTOP is really that useful - `i2c_hal` does support this properly and should be used instead if needed.
   
   Note: this was created since adding TWIM support to I2C HAL requires also using semaphores there for synchronization which should not be really used in HAL (see discussion in https://github.com/apache/mynewt-core/pull/1559) but there's no problem using them in bus driver since it works on OS level.

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