Skip to content

HW UART - Remove repetitive NVIC SetPriority calls#1227

Merged
fpistm merged 1 commit into
stm32duino:masterfrom
AbsoluteCatalyst:fix_uart_repetitive_setpriority_calls
Nov 3, 2020
Merged

HW UART - Remove repetitive NVIC SetPriority calls#1227
fpistm merged 1 commit into
stm32duino:masterfrom
AbsoluteCatalyst:fix_uart_repetitive_setpriority_calls

Conversation

@AbsoluteCatalyst

Copy link
Copy Markdown
Contributor

Hi,
Is there any purpose behind the NVIC UART IRQ priority being repetitively set within uart_attach_tx_callback and uart_attach_rx_callback rather than only at initialization?

Unfortunately this prevents any runtime/external changes done to the IRQ priority since it'd constantly be reset.

If there's no problem having it this way:
I've quickly removed the two extra setPriority calls and replaced them with a single call at init().

Was impossible to change the UART IRQ's priority externally. Now only set once upon initialization.
@fpistm fpistm requested a review from ABOSTM November 2, 2020 20:10
@fpistm fpistm added the enhancement New feature or request label Nov 2, 2020

@ABOSTM ABOSTM left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@fpistm fpistm added this to the 2.0.0 milestone Nov 3, 2020
@fpistm fpistm merged commit 035bfa3 into stm32duino:master Nov 3, 2020
@AbsoluteCatalyst

Copy link
Copy Markdown
Contributor Author

Thanks!

@fpistm

fpistm commented Nov 3, 2020

Copy link
Copy Markdown
Member

Welcome @AbsoluteCatalyst
Thanks for the PR too 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants