mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 19:20:22 +01:00
stm32/boards/NUCLEO_G474RE: Change flash latency for NUCLEO-G474RE.
For NUCLEO-G474RE, FLASH_LATENCY_4 can be specified instead of FLASH_LATENCY_8 because it runs at 170MHz. Signed-off-by: Yuuki NAGAO <wf.yn386@gmail.com>
This commit is contained in:
committed by
Damien George
parent
06a90e0b4b
commit
03e3a06de6
@@ -29,7 +29,7 @@
|
||||
#define MICROPY_HW_CLK_USE_HSI48 (1) // for RNG
|
||||
|
||||
// 4 wait states
|
||||
#define MICROPY_HW_FLASH_LATENCY FLASH_LATENCY_8
|
||||
#define MICROPY_HW_FLASH_LATENCY FLASH_LATENCY_4
|
||||
|
||||
// UART config
|
||||
#define MICROPY_HW_LPUART1_TX (pin_A2) // A2 (to STLINK), B11, C1
|
||||
|
||||
@@ -494,7 +494,7 @@ MP_WEAK void SystemClock_Config(void) {
|
||||
#endif
|
||||
|
||||
#if defined(STM32G4)
|
||||
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_8) != HAL_OK) {
|
||||
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, MICROPY_HW_FLASH_LATENCY) != HAL_OK) {
|
||||
MICROPY_BOARD_FATAL_ERROR("HAL_RCC_ClockConfig");
|
||||
}
|
||||
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_RTC | RCC_PERIPHCLK_LPUART1
|
||||
|
||||
Reference in New Issue
Block a user