-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
drivers: entropy: stm32: clear data available IRQ flag on WB09 #87364
Merged
kartben
merged 2 commits into
zephyrproject-rtos:main
from
mathieuchopstm:wb09_trng_acknowledge_irq
Mar 24, 2025
Merged
drivers: entropy: stm32: clear data available IRQ flag on WB09 #87364
kartben
merged 2 commits into
zephyrproject-rtos:main
from
mathieuchopstm:wb09_trng_acknowledge_irq
Mar 24, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
etienne-lms
reviewed
Mar 19, 2025
e9150d1
to
9e49fd2
Compare
Modified to take @etienne-lms comment into account + added small refactor to make header more readable. Tested OK on WB05, WB09 and H7 after refactor. |
etienne-lms
reviewed
Mar 20, 2025
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.
LGTM aside indentation issues.
CONFIG_SOC_STM32WB09XX implies CONFIG_SOC_SERIES_STM32WB0X, making it pointless to assert the latter is defined before checking the former. Simplify #ifdef checks in the entropy driver's LL wrappers thanks to this observation, by removing unnecessary nesting. Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
The STM32WB09 TRNG does not clear FIFO_FULL IRQ flag in hardware once the FIFO is no longer full, a behavior which differs from all other series. This results in spurious IRQs, as the TRNG IRQ line effectively remains high forever once a single interrupt has been generated. Clear the flag in software after reading from the FIFO on STM32WB09 SoC. N.B.: the error IRQ flag is already handled properly, as this flag must also be cleared by software on other series. Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
9e49fd2
to
921e90c
Compare
etienne-lms
approved these changes
Mar 20, 2025
erwango
approved these changes
Mar 20, 2025
asm5878
approved these changes
Mar 24, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The STM32WB09 TRNG does not clear
FIFO_FULL
IRQ flag in hardware once the FIFO is no longer full, a behavior which differs from all other series. This results in spurious IRQs, as the TRNG IRQ line effectively remains high forever once a single interrupt has been generated.Clear the flag in software after reading from the FIFO on STM32WB09 SoC.
N.B.: the error IRQ flag is already handled properly, as this flag must also be cleared by software on other series.