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

app_twi stuck in internal_transaction_in_progress

Hi,

I'm trying to communicate the nrf52832 with a LIS2DH accelerometer and when I'm trying to read 192 (32*6) bytes of data (to empty the entire accelerometer's FIFO) my code gets stuck on the line 367 of 'app_twi.c' file since the internal_transaction_in_progress=1.

I don't know if using EasyDMA would help... I can read and communicate with the acelerometer without problems, but when I try to read those registers I get this situation.

Also I don't know if it's better to use the app_twi_perform or the scheduled one for this situation.

Thank you!

PD: I have attached the project, is based on the BLE_uart, this way I can send commands to it... (the function is the "read_all_axis").app_uart.rar

Parents
  • Well I discovered part of the problem: The number of transfers isn't 192, it's 2. I do 2 transfers and the read trasfer reads 192 bytes. Now the problem I'm facing is that theorically the acelerometer changes the output register adress automatically with every burst read, but when I do the read the result is the same value 192 times... So now I don't know if the auto address doesn't work or if I need to send a combo of 'read+STOP_TWI' signal or whatever... Any hints?

Reply
  • Well I discovered part of the problem: The number of transfers isn't 192, it's 2. I do 2 transfers and the read trasfer reads 192 bytes. Now the problem I'm facing is that theorically the acelerometer changes the output register adress automatically with every burst read, but when I do the read the result is the same value 192 times... So now I don't know if the auto address doesn't work or if I need to send a combo of 'read+STOP_TWI' signal or whatever... Any hints?

Children
No Data
Related