cancel
Showing results for 
Search instead for 
Did you mean: 

stm32l4xx_ll_rcc.h and stm32g4xx_ll_rcc.h wrong implementation of LL_RCC_PLL_ConfigDomain_SYS macro

Robert1
Associate II

Wrong original:

__STATIC_INLINE void LL_RCC_PLL_ConfigDomain_SYS(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLR)

{

 MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLM | RCC_PLLCFGR_PLLN | RCC_PLLCFGR_PLLR,

       Source | PLLM | (PLLN << RCC_PLLCFGR_PLLN_Pos) | PLLR);

}

My correction

__STATIC_INLINE void system_LL_RCC_PLL_ConfigDomain_SYS(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLR)

{

//--------------------------------------------------------------------------

MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLM | RCC_PLLCFGR_PLLN | RCC_PLLCFGR_PLLR,

Source | (PLLM << RCC_PLLCFGR_PLLM_Pos) | (PLLN << RCC_PLLCFGR_PLLN_Pos) | (PLLR << RCC_PLLCFGR_PLLR_Pos) );

}  // system_LL_RCC_PLL_ConfigDomain_SYS

1 REPLY 1

Hi @Robert​ 

I did not understand the problem, could you clarify please.

Best regards,

Nesrine