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

Inline ESP::getCycleCount() to make it safe to call from ISRs #6477

Merged
merged 1 commit into from
Sep 2, 2019

Conversation

dok-net
Copy link
Contributor

@dok-net dok-net commented Sep 1, 2019

Someone found out that on the ESP32, ESP::getCycleCount() is not ISR safe.
While the fix, inlining the machine code, is taken from ESP8266, on this platform I suggest additionally adding
__attribute__((always_inline))
to the respective functions to force the GCC to inline, no matter what compiler options are used by the build process.

This is a port of the fixing PR espressif/arduino-esp32#3165.

@dok-net dok-net force-pushed the isr_safe_cyclecount branch from b531158 to 95298e4 Compare September 1, 2019 21:56
@devyte devyte merged commit 0399bb1 into esp8266:master Sep 2, 2019
@devyte devyte added this to the 2.6.0 milestone Sep 2, 2019
@dok-net dok-net deleted the isr_safe_cyclecount branch September 2, 2019 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants