Hello,
I have an IIM chip here, that reports with the WhoAmI-ID 0x54 @ Register 0x75. Does anyone know the exact name of the chip? It should normally be an IIM42352 with ID 0x6D. Maybe it is just broken.
Thanks for your help.
- Log in to post comments
phpbb Topic ID
47595
Hurray, it works now.
The IIM42352 now responds with ID 0x6D. I selected the wrong SPI-mode, I used Mode3 and not Mode2.
I encountered an unexpected WHOAMI response too, but from an IIM-42652. I will mention what seems to have solved it for me:
When I was first trying to read the WHO_AM_I register, I sent the register address in the first byte (and set the "Read" bit), and then I filled the second ("don't care") byte with 0x00. The response that came back to me when I did this was 0x5C, which was not what I was expecting. Because my unit was an IIM-42652, I was expecting 0x6F.
I discovered (after trying many other things) that if I instead filled the second ("don't care") byte with 0xFF, then the expected WHOAMI value came back in the response.
I don't have an explanation for why the content that I put into the second byte should affect the outcome of reading the WHOAMI register. (Changing my code back and forth, the behavior is reproducible.) It does make me a bit nervous to see this behavior, but I have now changed my source-code's "don't care" constant to 0xFF, and (hopefully) this will allow me to move forward.