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

How to read ADXL362 register values in nrf52?

I am using SPI0 of nrf52.Following is the code:

main.c

Parents
  • Can you please try to tidy up your code? Remove all the code that is not necessary and show us how exactly you are initiating the SPI and how you do read and write operations.

  • Hi Martin, Yes you are right.Actually I was not waiting for flag "m_transfer_completed" to generate.That is when "m_transfer_completed=true" then only I can send next byte to the ADXL362 register. As per your comment I have modified my code and now I can communicate (Read as well as Write) with ADXL362.Thanks for your comment.

Reply
  • Hi Martin, Yes you are right.Actually I was not waiting for flag "m_transfer_completed" to generate.That is when "m_transfer_completed=true" then only I can send next byte to the ADXL362 register. As per your comment I have modified my code and now I can communicate (Read as well as Write) with ADXL362.Thanks for your comment.

Children
No Data