-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
digitalWrite writes after yield() or delay(0) #716
Comments
the maximum GPIO change frequency is limited by espressif to ~8Mhz. but you can speed up you SPI code by using the fastest possible way to change the GPIOs is using the |
I see And I understand I think, but spi clock freq is set to 10MHz. |
This might be related to the issue that Makuna had with the WS2812s. The first bit was always longer for some reason. He solved it in this commit by using ICACHE_RAM_ATTR and moving the function to a C file, as the arduino IDE seemed to ignore it if it was in a cpp file. I could most certainly be wrong though.
|
I think the previous comment about ICACHE_RAM_ATTR is relevant. Without it, there could be a flash access triggered, causing odd behavior and crashes. Also, for timing-sensitive code, there are other things to consider (e.g.: code for reading DHT sensors). |
I am having a peculiar issue,
I am trying to write a pin low and high. and notice that it doesn't take effect immediately,
my application requires it to be immediate, because it triggers a conversion (ADC) and has to be read directly after. I had scoped the output, to find the problem.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: