Nodate
Nodate copied to clipboard
HSE_VALUE required to support Clock::enableMaxClock()
The NUCLEO-F746ZG board has an 8 MHz external clock, but HSE_VALUE defaults to 25 MHz at line 51 of system_stm32f7xx.c:
#if !defined (HSE_VALUE)
#define HSE_VALUE ((uint32_t)25000000) /*!< Default value of the External oscillator in Hz */
#endif /* HSE_VALUE */
This causes SystemCoreClockUpdate() to incorrectly calculate SystemCoreClock when using a HSE-driven PLL as the source for SYSCLK on the NUCLEO-F746ZG board.
It is unclear if a similar mismatch affects other boards.
One possible solution would be to include a value for HSE_VALUE in the board files at stm32/boards in conjunction with a corresponding symbol definition in the stm32 makefile.
A short-term fix is to include the following line in each project makefile:
APP_FLAGS = -DHSE_VALUE=8000000
changing the value to whatever is appropriate for the board/HSE in use.