-
Notifications
You must be signed in to change notification settings - Fork 3k
STM32: serial: use proper macro to check interrupt #4707
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
Found a side effect for part of this change: so just updated .. |
4678a61
to
0a6d36b
Compare
@0xc0170 Could you find someone to review this? |
One note, first line of teh commit message should be maximum 50 characters (you can see the wrapping here), can you update that please? |
Depending on families, different HAL macros are defined to check the state of serial interrupts. In several cases, we can find only 1 macro: __HAL_UART_GET_IT_SOURCE Checks whether the specified UART interrupt has occurred or not But in F0, F3, F7, L0, L4 there are 2 different macros __HAL_UART_GET_IT Checks whether the specified UART interrupt has occurred or not __HAL_UART_GET_IT_SOURCE Checks whether the specified UART interrupt source is enabled. In the later case, __HAL_UART_GET_IT_SOURCE was being used so far, but actually needs to be replaced by __HAL_UART_GET_IT. Using the right macro, we also check the proper flags accordingly.
0a6d36b
to
be8024d
Compare
@0xc0170 Ok update done - do you want me to also update the PR title ? |
Yes, please |
done as well |
/morph test |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
Description
Depending on families, different HAL macros are defined to check the
state of serial interrupts. In several cases, we can find only 1 macro:
__HAL_UART_GET_IT_SOURCE
Checks whether the specified UART interrupt has occurred or not
But in F0, F3, F7, L0, L4 there are 2 different macros
__HAL_UART_GET_IT
Checks whether the specified UART interrupt has occurred or not
__HAL_UART_GET_IT_SOURCE
Checks whether the specified UART interrupt source is enabled.
In the later case, __HAL_UART_GET_IT_SOURCE was being used so far,
but actually needs to be replaced by __HAL_UART_GET_IT. Using the right
macro, we also check the proper flags accordingly.
This PR solves issue #3452
Status
READY
Test
Tested with simple test that produce an overrun condition, and making sure the board won't freeze.
Test code below, with a wire on RX/TX of the 2nd serial named (uart):