-
Notifications
You must be signed in to change notification settings - Fork 15
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
Incorrect STM32L4P5xx and STM32L4Q5xx RNG Initialisation in Low Level API #14
Comments
Another suggestion, it would be useful if stm32l4xx_hal_driver/Inc/stm32l4xx_ll_rng.h Lines 661 to 675 in eb4b2d2
Currently the write function will have no effect if the user just calls it with the value they want in the HTCR e.g. LL_RNG_SetHealthconfiguration(0x00007274); |
Hello @badcf00d, Thank you for your contribution. Your report will be forwarded to our development team for analysis. As a first answer, it's Cleary mentioned in Reference manual to unlock the HCR register before reading or writing in the register in this case you can call the function Thanks in advance for your patience and understanding. With Regards, |
ST Internal Reference: 173093 |
In a post here https://community.st.com/t5/stm32-mcus-security/why-am-i-getting-an-rng-failure-on-the-stm32l4p5/m-p/203250. It was recognised that the HAL was initialising the RNG peripheral incorrectly.
The HAL function
HAL_RNG_Init
seems to have been corrected to set the correct CONFIG[1,2,3] and HTCR.However the LL version of this function doesn't include any of this, so the CONFIG[1,2,3] and HTCR will all contain the wrong values when using this function.
stm32l4xx_hal_driver/Src/stm32l4xx_ll_rng.c
Lines 118 to 135 in eb4b2d2
Could this function be updated to set the correct values, as described in Table 225. RNG configurations
of RM0432?
The text was updated successfully, but these errors were encountered: