Question
RCC_PLLSAIConfig() function has bug in STM32F469I-Discovery
Posted on January 06, 2016 at 19:57
I'm working on a usb project based on the STM32F469I-Discovery.
My project use STM32F4xx_DSP_StdPeriph_Lib_V1.6.1, however it always occurs some error when usb device plugged.Finally, i find the function RCC_PLLSAIConfig() has bug. void RCC_PLLSAIConfig(uint32_t PLLSAIN, uint32_t PLLSAIP, uint32_t PLLSAIQ, uint32_t PLLSAIR) { /* Check the parameters */ assert_param(IS_RCC_PLLSAIN_VALUE(PLLSAIN)); assert_param(IS_RCC_PLLSAIP_VALUE(PLLSAIP)); assert_param(IS_RCC_PLLSAIQ_VALUE(PLLSAIQ)); assert_param(IS_RCC_PLLSAIR_VALUE(PLLSAIR)); RCC->PLLSAICFGR = (PLLSAIN << 6) | (PLLSAIP << 16) | (PLLSAIQ << 24) | (PLLSAIR << 28); } The correct is that: void RCC_PLLSAIConfig(uint32_t PLLSAIN, uint32_t PLLSAIP, uint32_t PLLSAIQ, uint32_t PLLSAIR) { /* Check the parameters */ assert_param(IS_RCC_PLLSAIN_VALUE(PLLSAIN)); assert_param(IS_RCC_PLLSAIP_VALUE(PLLSAIP)); assert_param(IS_RCC_PLLSAIQ_VALUE(PLLSAIQ)); assert_param(IS_RCC_PLLSAIR_VALUE(PLLSAIR)); RCC->PLLSAICFGR = (PLLSAIN << 6) | (((PLLSAIP >> 1) - 1) << 16) | (PLLSAIQ << 24) | (PLLSAIR << 28); } #stm32f469