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: make micros compatible with ISR #1702

Merged
merged 1 commit into from
May 10, 2022
Merged

Conversation

fpistm
Copy link
Member

@fpistm fpistm commented Apr 29, 2022

It is kind of revert commit 15dc04b.

Note: delayMicroseconds() does not rely anymore on micros() so accuracy is less important.

Fixes #1680

/cc @matthijskooijman

@fpistm fpistm added enhancement New feature or request fix 🩹 Bug fix labels Apr 29, 2022
@fpistm fpistm added this to In progress in STM32 core based on ST HAL via automation Apr 29, 2022
@fpistm fpistm added this to the 2.3.0 milestone Apr 29, 2022
It is kind of revert commit 15dc04b.

Note:  `delayMicroseconds()` does not rely anymore on `micros()`
so accuracy is less important.

Fixes stm32duino#1680

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
@fpistm
Copy link
Member Author

fpistm commented May 2, 2022

Hi @matthijskooijman
Could you tell me if it is OK for you?
BR

@fpistm fpistm requested a review from ABOSTM May 9, 2022 09:13
STM32 core based on ST HAL automation moved this from In progress to Reviewer approved May 10, 2022
Copy link
Contributor

@ABOSTM ABOSTM left a comment

Choose a reason for hiding this comment

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

LGTM

@fpistm fpistm merged commit 3907739 into stm32duino:main May 10, 2022
STM32 core based on ST HAL automation moved this from Reviewer approved to Done May 10, 2022
@fpistm fpistm deleted the micros_ISR branch May 11, 2022 08:07
@matthijskooijman
Copy link
Contributor

I'm a bit late to the party, have been a bit busy with some other work ;-)

Code looks exactly right to me. I'll see if I can find a little bit more time to also test against my original testcase, but I'm confident this will work correctly.

Thanks!

@fpistm
Copy link
Member Author

fpistm commented May 13, 2022

I've tested your sketch and was not able to reproduce ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fix 🩹 Bug fix
Projects
Development

Successfully merging this pull request may close these issues.

Micros is not ISR-safe
3 participants