Description
Describe the bug
When using the Nucleo-F767ZI board, or all other STMF767 boards as I can see, will fail to boot into a STM32Duino firmware because the SystemClock_Config()
for those boards triggers an assert()
.
Specifically, this code does not initialize the RCC_OscInitStruct.PLL.PLLR
value to a legal value
Due to RCC_OscInitTypeDef RCC_OscInitStruct = {};
it will have value 0.
But then this assert will trigger
Because A) For that chip, RCC_PLLCFGR_PLLR
is defined and B) "0" is not valid for PLLR
Arduino_Core_STM32/system/Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_rcc_ex.h
Lines 3504 to 3505 in 8e173d6
To Reproduce
Blinky code on Nucleo F767 does not work. Chip crashes on startup.
#define LED_PIN PB0 // Default user LED (LD1)
void setup() {
Serial.begin(115200);
pinMode(LED_PIN, OUTPUT);
Serial.println("Setup Complete");
}
void loop() {
digitalWrite(LED_PIN, HIGH); // Turn LED on
delay(500);
digitalWrite(LED_PIN, LOW); // Turn LED off
delay(500);
}
Steps to reproduce the behavior:
- Plug in Nucleo F767
- Upload Blinky
- Nothing happens
Expected behavior
Clock init code should not crash chip.
Screenshots
Call stack of crash
assert_failed (file=file@entry=0x8006534 “/Users/.platformio/packages/framework-arduinoststm32/system/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_rcc.c”, line=line@entry=601) at /Users/.platformio/packages/framework-arduinoststm32/libraries/SrcWrapper/src/stm32/stm32_def.c:33
33 _Error_Handler((const char *)file, line);
Desktop (please complete the following information):
- OS: Windows
- Arduino IDE version: 2.3.4
- STM32 core version: 2.10.1
- Tools menu settings if not the default: Default
- Upload method: SWD
Board (please complete the following information):
- Name: Nucleo F767ZI
- Hardware Revision: -/-
- Extra hardware used if any: None
Additional context
Originally reported via PlatformIO forum.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status