cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f4 HSE use bypass clock source bug

liu yong
Associate II
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:

  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!

2 REPLIES 2
Amel NASRI
ST Employee
Posted on October 27, 2017 at 12:43

Hi

yong.Liu.003

‌,

Please share your .ioc file. I don't reproduce such issue.

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

liu yong
Associate II
Posted on October 30, 2017 at 10:25

st.mcu

When I new a cube project in version

4.0, there is no problem. The attached ico project is created in cube version 4.0, and I migrate it to 4.0, than the bugoccurs.