I am using nrf51822, sdk version 11.0, sofdevice 130, i2c initialized in non-blocking mode. The read seems ok. The write is problematic for me.
I am using nrf51822, sdk version 11.0, sofdevice 130, i2c initialized in non-blocking mode. The read seems ok. The write is problematic for me.
Hello Josh ! The error_code was NRF_SUCCESS so it made me wonder a little bit. I made it work ! :D The problem was that I didn't wake the MPU6050 up. Thank you very much for your help, Josh ! You saved me a lot of hours :)
Hello Jorgen ! With the help of your example, I made it work ! It was the waking up of the MPU6050 that was my problem ! Thank you, Jorgen ! I think this example should be part of a twi_example in the sdk.
Glad you got it working! The examples in the SDK should be as generic as possible and try to not target a specific device (unless this is a device used by the majority of customer group). Please accept this answer to help others find help if stuck on the same problem!
Excellent, and that makes sense! Glad to hear you got to the bottom of it.
Thanks Josh This helped me. However in the read functions i had to add a 20 millisecond delay after calling the write functions to give some time for the write function to complete. Else i am getting the error code 17 Which means NRF_ERROR_BUSY i.e the write operation isn't complete.