Associate II
October 27, 2017
Question
stm32f4 HSE use bypass clock source bug
- October 27, 2017
- 2 replies
- 1422 views
Posted on October 27, 2017 at 04:26
Cube Version: STM32Cube_FW_F4_V1.17.0
When I use bypass clock source for HSE,cube(4.23.0) generate init code:
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_LSI |RCC_OSCILLATORTYPE_HSE;
RCC_OscInitStruct.HSEState = RCC_HSE_BYPASS;
I find two solutions for this bug:
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_LSI
|RCC_OSCILLATORTYPE_HSE;
RCC_OscInitStruct.HSEState = RCC_HSE_BYPASS;
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSI
|RCC_OSCILLATORTYPE_HSE;
RCC_OscInitStruct.HSEState = RCC_HSE_BYPASS;
which one is right?
Thank you!
