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

add settling time on sensor start-up #9164

Merged
merged 2 commits into from
Mar 30, 2018
Merged

Conversation

ASM3
Copy link
Contributor

@ASM3 ASM3 commented Mar 26, 2018

Add settling time after setting adis16448 registers

Copy link
Member

@LorenzMeier LorenzMeier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This delays the whole system. Instead it would be appropriate to add functionality to back off in the next call / schedule the following call later.

@dagar
Copy link
Member

dagar commented Mar 26, 2018

@ASM3
Copy link
Contributor Author

ASM3 commented Mar 27, 2018

Obviously, this is the purpose. We want to prevent the uc to perform any kind of SPI writing cycle during this epoch, what potentially could mess up the adis16448 registers (happened in very rare cases). If this delay during boot-up sequence is so critical for the system another solution can potentially be figured out.

@ASM3
Copy link
Contributor Author

ASM3 commented Mar 27, 2018

BTW, the main purpose of this functionality is to set all units with the default calibration values so that the system can align with a standard configuration. One can decide that it is up to the user to perform this step and then this functionality can be completely removed from the start up sequence.

@ASM3 ASM3 force-pushed the fix/adis16448_st_start branch from 79bdf00 to 3665a98 Compare March 29, 2018 12:18
@ASM3
Copy link
Contributor Author

ASM3 commented Mar 29, 2018

The restore factory calibration functionality is unnecessary on the boot-up sequence and therefore removed

@philipoe
Copy link
Contributor

philipoe commented Mar 29, 2018

@dagar @LorenzMeier To explain a bit: We noticed that the _set_factory_default() functionality can in rare cases (ca 5% of all bootups of the ADIS driver + Pixhawk) put the ADIS in a faulty state where it delivers updates too slowly (causing a "GYRO: STALE" warning by PX4). The reason is that the set_factory_default() call requires (as per the Analog Devices datasheet) a certain time period without any communication on the SPI bus, but apparently something within PX4 is writing stuff to the SPI bus (@ASM3 measured this using a logic analyzer). The set_factory_default() call is however not really necessary and was just added in case a user messes up the ADIS configuration, but we at ASL have actually never needed that call even in 4 years of using ~5 platforms with the ADIS. Therefore, it is now removed, and testing has shown that with the fix in this PR everything works 100% reliably (tested during ~50 bootups) now.

@dagar dagar merged commit 5426031 into PX4:master Mar 30, 2018
@ASM3 ASM3 deleted the fix/adis16448_st_start branch April 3, 2018 08:15
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.

4 participants