mirror of https://github.com/ARMmbed/mbed-os.git
Add Periphclock enable for L476 products
parent
24832ca365
commit
5069c73e8d
|
@ -48,6 +48,12 @@ int mbedtls_hardware_poll( void *data, unsigned char *output, size_t len, size_t
|
|||
{
|
||||
int ret;
|
||||
((void) data);
|
||||
RCC_PeriphCLKInitTypeDef PeriphClkInitStruct;
|
||||
|
||||
/*Select PLLQ output as RNG clock source */
|
||||
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_RNG;
|
||||
PeriphClkInitStruct.RngClockSelection = RCC_RNGCLKSOURCE_PLL;
|
||||
HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct);
|
||||
|
||||
/* RNG Peripheral clock enable */
|
||||
__HAL_RCC_RNG_CLK_ENABLE();
|
||||
|
@ -73,7 +79,6 @@ int mbedtls_hardware_poll( void *data, unsigned char *output, size_t len, size_t
|
|||
/* RNG Peripheral clock disable - assume we're the only users of RNG */
|
||||
__HAL_RCC_RNG_CLK_DISABLE();
|
||||
|
||||
|
||||
return( ret );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue