This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

TWI easy DMA parallel channels

Hi,

assuming I have an IMU sensor with 3 different interrupt lines. And I want to start a TWI DMA transfer for each interrupt line in parallel. Is this possible since there is only one memory? This would mean to choose for each interrupt line one buffer address.

Parents
  • Yes, you have parallel DMA channels. TWI master have 2 channels, one for reading and one for writing. and SPI master also have 2 channels, one for reading and one for writing. This means that you can read data from RAM into the peripheral at the same time as you write data to the RAM from the peripheral.

    On the nRF52832 you have 8 GPIOTE channels. So you can have 8 interrupts coming in at the same time, that can trigger different tasks. E.g. with 2 interrupts at the same time, you will get 2 GPIOTE events generated at the same time, if GPIOTE event 1 is configured to trigger a START_TX for the TWI master, and GPIOTE event 2 is configured to trigger a START_TX for the SPI, then this will happen in parallel.

    I also recommend you to read the TWI master driver documentation and API, as it gives a good overview over the capabilities not only of the driver, but the TWIM peripheral it self, and how it can be used with DMA and controlled by PPI.

  • That’s what I was looking for. Thanks great support again.

Reply Children
No Data
Related