-
-
Notifications
You must be signed in to change notification settings - Fork 284
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
check mux mode when using digitalWrite #335
Conversation
-check and make sure that the pin is in GPIO_MUX_MODE when doing a digitalWrite() -this has a slight performance impact of digitalWrite -it also comsumes an extra byte in SRAM per pin -it does however give us the ability to track the muxing state of each pin
Works for me! |
@russmcinnis . Can you please verify? |
@eriknyquist I2S will be added once the @SidLeung finishes the changes for it |
I test variations of the examples and it works for me too. I was doing some testing using sketch delayMicroseconds() to just measure the frequency of 100 consecutive digitalRead() or digitalWrite() calls without checking any signals. The digitalWrite() function speed with the mux checking added was about 75% of the speed without it. |
@russmcinnis please test this with CurieSoftwareSerial library. |
@russmcinnis can you see what SoftwareSerial behaviour is like with these changes? |
I don't see any difference. I ran the BAT test that hooks up SoftwareSerial pins to Hardware Serial (Serial1) pins. The test runs a lot of transactions and passes. Next I ran most of the baud rates by looping: |
@calvinatintel please merge this one also. Jenkins merger is also failing for this one |
-check and make sure that the pin is in GPIO_MUX_MODE when doing a
digitalWrite()
-this has a slight performance impact of digitalWrite
-it also comsumes an extra byte in SRAM per pin
-it does however give us the ability to track the muxing state of each
pin