Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adis16470 stability fixes #862

Merged
merged 4 commits into from
Jan 8, 2025
Merged

Adis16470 stability fixes #862

merged 4 commits into from
Jan 8, 2025

Conversation

jlaitine
Copy link

@jlaitine jlaitine commented Jan 8, 2025

Fix various issues in ADIS16470 initialization

Fix issues related to unspecified delays in the ADIS sensor:

1. The reset occurs only after some delay from writing the SW reset, and the 193ms
mentioned in the datasheet occurs only after that. When the reset sequence really
starts can be determined with logic analyzer by monitoring DR signal and SPI writes.
This delay is measured to be between 10-20ms, so add 20ms to SW reset recovery time.

2. The self test sequence starts only after some delay from writing the command, and the
14ms mentioned in the datasheet starts only after this delay. Again, the behaviour can be
studied with logic analyzer by monitoring the DR signal and the SPI writes - when the self
test is completed, the IMU starts measuring again and the DR starts toggling. This
unspecified delay is measured to be somewhere between 5-10ms, so add 10ms to self test time.

3. After writing the register set in Configure(), there is an unspecified delay before the
register can be read back. This was bisected to be around 50us, so add 100us delay after
setting the registers before trying to read them back.

In addition:
1. Make sure that the IMU has woken up after reset by reading the PROD_ID register
always after the reset, also before starting the self test sequence on the first boot.
2. If self test fails, reset the IMU as a false result may occur due to moving the device
during self test (according to the datasheet).

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
…ead and RegisterWrite calls

Add a 1us delay before register read and register write. It is not specified in the datasheet,
but it has been found via testing & oscilloscope measurements that > 1us inactive phase
is required between reads and writes.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
In case of any register read/write errors it is not enough to just check if
one of the bits is 0; the whole register contents needs to be checked. Also,
if initial read of the register fails in any reason, we should not write
back some corrupted value such as 0 or 0xFFFE.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
@jlaitine jlaitine requested review from kordets, pussuw and jpaali January 8, 2025 10:37
@jlaitine jlaitine merged commit f7fba8a into main Jan 8, 2025
27 checks passed
@jlaitine jlaitine deleted the adis16470_stability_fixes branch January 8, 2025 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants