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

Catch FPEs on stm32, raise InternalError on same #11470

Closed
wants to merge 2 commits into from

Conversation

peterbarker
Copy link
Contributor

No description provided.

@tridge
Copy link
Contributor

tridge commented Jun 3, 2019

nice! I think we need a test to run on stm32 boards (F4, F7, H7) to check the behavior. We need to make sure we keep flying after a FPE and get the right Inf etc

@peterbarker
Copy link
Contributor Author

@tridge I used a patch on a bench-test Pixhawk which did a floating-point division-by-zero when switching into loiter. The Pixhawk continued to run.

I was considering adding an RC option to do it - but that's starting to feeling the "everything looks like a nail" part of ArduPilot.

I was wondering whether we should not clear these flags, just look at them. That would be a little safer but lose the ability to count the number of floating point exceptions occurring.

@peterbarker
Copy link
Contributor Author

.... I should also point out that I'm not attempting to catch/handle the exception. These flags appear to be set regardless of any vectors, and clearing them shouldn't affect anything other than anybody else trying to monitor them.

@WickedShell
Copy link
Contributor

Worth testing with some simple lua scripts that would provoke these. I could easily see them creating a FPE which we then would be panicing the user with, but since it's a script it isn't nearly as worrisome.

@peterbarker
Copy link
Contributor Author

Stopped clearing the FPE registers as per devcall discussions.

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.

None yet

4 participants