Skip to main content
liu yong
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:

  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!

    This topic has been closed for replies.

    2 replies

    Amel NASRI
    ST Technical Moderator
    October 27, 2017
    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 "Best Answer" on the reply which solved your issue or answered your question.
    liu yong
    liu yongAuthor
    Associate II
    October 30, 2017
    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.