Closed plusk01 closed 1 year ago
Thank you for your pull request. I tested the repo with only Teensy 4.0. At that time, It worked fine. So, please comment about this fact. (or split the code using the board type)
Thanks for the context. SPI mode should be a board independent setting - it depends on what the ICM device expects. According to the reset value of the DEVICE_CONFIG
register, the default expected SPI mode is mode 0 or 3.
I am not sure why it worked on the T4 (maybe some code elsewhere was changing the relevant bit in the DEVICE_CONFIG
reg?), but given what the datasheet says I vote to use either mode 0 or 3 in this repo.
I suppose whether or not to use mode 0 or 3 is up for discussion - i tried both with my esp32 and they both work, whereas modes 1 and 2 do not.
LGTM!
ICM 42688-p device expects SPI Mode 3 protocol (idle clock high; sample data on rising edge)
closes #3