-
Notifications
You must be signed in to change notification settings - Fork 1k
[PR 753 rework][SoftwareSerial] Add function to set interrupt priority #755
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
Conversation
This will allow to customize IRQ priority Signed-off-by: Frederic Pillon <[email protected]>
Signed-off-by: Frederic Pillon <[email protected]>
Fixes stm32duino#751 Signed-off-by: Frederic Pillon <[email protected]>
I like making this available for all hardware timers, instead of my change for only SoftwareSerial. I think this will also solve another issue, which is the need to re-set the priority every time the timer is resumed. I would like to test this on hardware, but will not have time to do so until tonight. You should have my results in the morning! |
@sjasonsmith About:
Well this is the case even with this PR because it is done by the |
I reworked this into my Marlin branch, and confirmed that it is working. I am able to rearrange my three timers (2 HardwareTimer + 1 SoftwareSerial) in any order and verify proper preempting behavior. I also verified that I can now set the priority once when initializing the HardwareTimer, rather than after resume as was previously required. |
@sjasonsmith |
@fpistm I highly approve this PR (although it breaks interface compatibility with Arduino's HardwareTimer) it's kinda necessary on STM32 platform. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
This PR is a rework of #753.
Instead of allow to be able to change the interrupt priority of the Timer used by the SoftwareSerial library, it allows to change interrupt priority of all the timer used through the HardwareTimer class.
Fixes #751