Skip to main content
Tesla DeLorean
Guru
February 15, 2018
Question

STM32Cube_FW_H7_V1.2.0 Bugs - NUCLEO HSE_VALUE

  • February 15, 2018
  • 6 replies
  • 1117 views
Posted on February 15, 2018 at 18:29

STM32Cube_FW_H7_V1.2.0\Projects\STM32H743ZI-Nucleo\Applications\FatFS\FatFS_uSD_Standalone\Inc\stm32h7xx_hal_conf.h

\STM32Cube_FW_H7_V1.2.0\Projects\STM32H743ZI-Nucleo\Applications\LwIP\LwIP_HTTP_Server_Netconn_RTOS\Inc\stm32h7xx_hal_conf.h

Nucleo uses 8 MHz HSE in BYPASS mode, the wrong HSE_VALUE breaks USART, rate computations, etc

/**

  * @brief Adjust the value of External High Speed oscillator (HSE) used in your application.

  *        This value is used by the RCC HAL module to compute the system frequency

  *        (when HSE is used as system clock source, directly or through the PLL).

  */

#if !defined  (HSE_VALUE)

#define HSE_VALUE    ((uint32_t)25000000) /*!< Value of the External oscillator in Hz   */

#endif /* HSE_VALUE */
    This topic has been closed for replies.

    6 replies

    John Craven
    Senior
    February 15, 2018
    Posted on February 15, 2018 at 21:35

    CubeMX also used or still use(s) wrong default HSE freq on some nucleo boards.

    Reported this here 

    https://community.st.com/0D50X00009XkYXhSAN

     

    Took me awhile to get a 767 project last last night because it still wasn't fixed in 4.23!

    Tesla DeLorean
    Guru
    February 15, 2018
    Posted on February 15, 2018 at 21:59

    Banged my head on this working on the H743ZI-NUCLEO this morning, had been working via the VCP/USART3 and then started porting the SDMMC project. The symptom looked like an issue with HSE_VALUE so the first thing I checked. Likely other errors, pulled these two with a quick scan, but does highlight the need for more rigour in the releases here.

    Didn't manage to get the SDMMC to work on the board, and did strip out the level converter stuff. Have pivoted back to the F767ZI-NUCLEO to get that working with the MicroSD socket to sanity check things.

    The STM32H743I-EVAL arrived so will bang on that too.

    0690X00000604OLQAY.jpg
    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    John Craven
    Senior
    February 15, 2018
    Posted on February 15, 2018 at 23:02

    LOL! i did almost the exact same thing last night.

    Got my FatFS/SDIO working disco-411, and decide to move to the NUC-767 board before adding FreeRTOS in the fray.

    Couldn't get it working for about 2hrs! and sdio was clocking was off what i expected, so i added MCO and figured the whole clk setup was wrong from CubeMX.

    Then i found the 16MHz HSE input freq in cube!

    But, what's worse is this my second time! Forget i reported it, until you posted! LOL 

    0690X00000604LEQAY.jpg

    FYI, Waveshare SD breakout is working fine on 1bit (haven't bothered with 4bit yet)

    http://www.waveshare.com/Micro-SD-Storage-Board.htm

     
    Nawres GHARBI
    ST Technical Moderator
    April 23, 2018
    Posted on April 23, 2018 at 18:21

    Hi Clive, 

    You have to select init Peripherals when loading the board to get the right default configuration 

    Tesla DeLorean
    Guru
    April 23, 2018
    Posted on April 23, 2018 at 20:21

    >>You have to select init Peripherals when loading the board to get the right default configuration 

    Sorry, I don't understand the response. These are examples in the HAL code trees, supposedly ready to build and tested, not output from CubeMX...

    The code settings for HSE_VALUE is demonstrably wrong, and causes the clocking in the system to be incorrectly computed.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..