Skip to content

STM trng_api uses always RCC_RNGCLKSOURCE_PLL #11674

@jarlamsa

Description

@jarlamsa

Description

All the STM targets that have TRNG will use RCC_RNGCLKSOURCE_PLL even if the
CLOCK_SOURCE is defined to be USE_PLL_MSI and TRNG should use RCC_RNGCLKSOURCE_MSI instead.

This is because the USE_PLL_MSI is defined in the system_clock.c and isn't seen in the trng_api.c thus evaluating to 0 when preprocessing. This causes issues when the same 48MHz clock is used between multiple peripherals and the TRNG modifies the RCC_CCIPR -register, while other peripherals think that the MSI-clock is used.

Tested with DISCO_L475VG_IOT01A, seems very likely that all the devices that are using the same STM-specific trng_api.c are having similar symptoms.

Issue request type

[ ] Question
[ ] Enhancement
[x] Bug

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions