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:
[email protected]


With regards,
Apache Git Services

Reply via email to