AnsweredAssumed Answered

stm32f4 HSE use bypass clock source bug

Question asked by liu yong on Oct 27, 2017
Latest reply on Oct 30, 2017 by liu yong

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:

  1. RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_LSI
    |RCC_OSCILLATORTYPE_HSE;
    RCC_OscInitStruct.HSEState = RCC_HSE_BYPASS;
    RCC_OscInitStruct.HSIState = RCC_HSI_ON;
  2. RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSI|RCC_OSCILLATORTYPE_HSE;
    RCC_OscInitStruct.HSEState = RCC_HSE_BYPASS;

which one is right?

Thank you!

Attachments

Outcomes