Skip to content

Conversation

@HoZHel
Copy link
Contributor

@HoZHel HoZHel commented Nov 10, 2025

Backport from #98151 with excluding the third commit as it does not compatible with v4.1.

Modification w.r.t the original PR:

  • Replace stm32_reg_write with WRITE_REG.

Fixes #98617 and #98668 for the backport v4.1

Fix the TRNG driver issue regarding non-stop ISR firing for STM32WB09 by
clearing RNG_IRQ_SR_ERROR_IRQ flag.

Signed-off-by: Ali Hozhabri <[email protected]>
Exclude the WB0x series from discarding data 12 times from the RNG data
register.

Add a comment to the recover_seed_error function explaining the reason
for reading and discarding data from the RNG data register 12 times.

Signed-off-by: Ali Hozhabri <[email protected]>
@sonarqubecloud
Copy link

@mathieuchopstm
Copy link
Contributor

For the record, can you explain as a comment here why the third commit (change DT_DRV_INST(0) -> DT_CHOSEN(zephyr_entropy)) is not compatible with 4.1?

@HoZHel
Copy link
Contributor Author

HoZHel commented Nov 11, 2025

For the record, can you explain as a comment here why the third commit (change DT_DRV_INST(0) -> DT_CHOSEN(zephyr_entropy)) is not compatible with 4.1?

In that time, rng_get_random() wasn't introduced in the BLE driver, and the configuration and use of RNG peripheral for BLE applications were done by WB0 lib available in modules/hal/stm32/lib/stm32wb0.
This backport to v4.1 impacts non-BLE applications using RNG peripheral.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants