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

fix(motor control): Use FreeRTOS delay instead of hardware delay #780

Merged
merged 1 commit into from
May 21, 2024

Conversation

caila-marashaj
Copy link
Contributor

@caila-marashaj caila-marashaj commented May 21, 2024

We recently started adding a delay between engaging a head motor and starting the execution of a move. We were using a HAL delay to do this, and it turns out that this blocks FreeRTOS's task handling, and in certain edge cases causes a firmware crash.

We should instead use FreeRTOS's built-in vTaskDelay

https://opentrons.atlassian.net/browse/RQA-2745

Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

excellent

@SyntaxColoring
Copy link

Whoa, nice find.

How did this cause a firmware crash? Some kind of watchdog timeout?

@caila-marashaj
Copy link
Contributor Author

Whoa, nice find.

How did this cause a firmware crash? Some kind of watchdog timeout?

It seems like a memory fault after the delay blocked the motor interrupt a bunch of times.

@caila-marashaj caila-marashaj merged commit 8738ed7 into main May 21, 2024
27 of 37 checks passed
@caila-marashaj caila-marashaj deleted the dont-use-hal-delay branch May 21, 2024 19:19
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