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

PPI on TWI instance 1 not working

I have adapted the "nrf52-mpu-easydma-using-timers-and-drivers" project from Github that I saw referenced in another post and have successfully modified it to work with my A/D converter on TWI instance 0.  However, I have implemented a virtual "ditto" of this design on TWI instance 1 and the TWI transfers never happen.  I can tell from the debug terminal that all 4 of the PPI channels appear to be set up properly (channels 0 - 3, 2 channels for each TWI instance) and have tested to confirm that the timer instance that should generate the TWI transfers is indeed triggering at the desired interval (tested by temporarily enabling the timer handler and toggling a GPIO pin).  I can share the code on a private ticket if needed, but I first want to confirm that this should be capable of working on two TWI instances.  Since they aren't on the same bus, I would have thought that this should be ok.  I appreciate any feedback/assistance.

UpdateI forgot to mention I'm using SDK 15.2 (was being used by one of our partners, so we're staying aligned) and SES 3.40, just in case that is relevant.  Also, I know the TWI instance 1 is set up properly because the init routine performs a proper tx/rx to configure the I2C accelerometer on that bus.

Parents
  • RE: the initial problem - my current thinking is that there is an issue with the init routine on my accelerometer because I've realized it doesn't complete all of the TWI transfers and the SDA line gets stuck low at some point.  I've seen this happen when I use intermingled TWI drivers (nrf_drv_twi_tx instead of nrf_drv_twi_xfer). So, I suspect this is not a PPI-related problem.  I will try to fix this and update later.  However, my issue with multiple slaves on the same TWI bus remains to be an issue.

Reply
  • RE: the initial problem - my current thinking is that there is an issue with the init routine on my accelerometer because I've realized it doesn't complete all of the TWI transfers and the SDA line gets stuck low at some point.  I've seen this happen when I use intermingled TWI drivers (nrf_drv_twi_tx instead of nrf_drv_twi_xfer). So, I suspect this is not a PPI-related problem.  I will try to fix this and update later.  However, my issue with multiple slaves on the same TWI bus remains to be an issue.

Children
No Data
Related