cancel
Showing results for 
Search instead for 
Did you mean: 

STM32Cube_FW_H7_V1.2.0 Bugs - NUCLEO HSE_VALUE

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 */
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
6 REPLIES 6
John Craven
Senior
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!

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
Up vote any posts that you find helpful, it shows what's working..
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

 
Posted on February 15, 2018 at 23:30

I'd picked up several of the ViewTool version

https://www.ebay.com/itm/1pcs-NEW-Micro-SD-Card-Module-Slot-Socket-Reader/272798769771

 

Nucleo F767ZI

Core=216000000, 216 MHz

CPUID 411FC270 DEVID 451

Cortex M7 r1p0

STM32F76xxx or F77xxx

C0000000 FFFFFFF8 00000000

10110221 12000011 00000040

FPU-D Single-precision and Double-precision

APB1=54000000

APB2=108000000

FatFs Testing (68300)

SystemCoreClock: 216000000

Mounting FatFs

FAT32

   30.4 GB total drive space

   30.3 GB available

  100.3 MB used

----        113 /DIR.TXT

----        175 /LOG.TXT

D---          0 /RINEX

----   32768000 /SPEEDTST.BIN

D---          0 /BASE_301

----       2494 /RINEX.INI

32768000 Bytes, 524170395 Cycles

 13.50 MBps Read  (FatFs)

32768000 Bytes, 524151419 Cycles

 13.50 MBps Read  (FatFs)

4864 ms

 13.47 MBps

200005A0 512

CrcFile Size:32768000 BufferSize:512

  32768000 CRC32:65744B39 PKZIP:9A8BB4C6 SPEEDTST.BIN

200005A0 1024

CrcFile Size:32768000 BufferSize:1024

  32768000 CRC32:65744B39 PKZIP:9A8BB4C6 SPEEDTST.BIN

200005A0 4096

CrcFile Size:32768000 BufferSize:4096

  32768000 CRC32:65744B39 PKZIP:9A8BB4C6 SPEEDTST.BIN

200005A0 20480

CrcFile Size:32768000 BufferSize:20480

  32768000 CRC32:65744B39 PKZIP:9A8BB4C6 SPEEDTST.BIN

200005A0 32768

CrcFile Size:32768000 BufferSize:32768

  32768000 CRC32:65744B39 PKZIP:9A8BB4C6 SPEEDTST.BIN

200005A0 40960

CrcFile Size:32768000 BufferSize:40960

  32768000 CRC32:65744B39 PKZIP:9A8BB4C6 SPEEDTST.BIN

200005A0 65536

CrcFile Size:32768000 BufferSize:65536

  32768000 CRC32:65744B39 PKZIP:9A8BB4C6 SPEEDTST.BIN

Done..

Infinite loop...
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Nawres GHARBI
ST Employee
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 

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
Up vote any posts that you find helpful, it shows what's working..