Skip to content

Commit 4016917

Browse files
committed
fix(spi_flash): Fix spi_flash clock for gpspi on esp32c5/p4
1 parent ff1c10e commit 4016917

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/spi_flash/esp_flash_spi_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ static uint32_t init_gpspi_clock(esp_flash_t *chip, const esp_flash_spi_device_c
291291
#if GPSPI_FLASH_LL_SUPPORT_CLK_SRC_PRE_DIV
292292
uint32_t pre_div = s_spi_find_clock_src_pre_div(clk_src_freq, GPSPI_FLASH_LL_PERIPHERAL_FREQUENCY_MHZ * 1000 * 1000);
293293
gpspi_flash_ll_clk_source_pre_div(spi_flash_ll_get_hw(config->host_id), pre_div / 2, 2);
294-
final_freq_mhz = clk_src_freq / (1 * 1000 * 1000) / (pre_div);
294+
final_freq_mhz = clk_src_freq / (pre_div);
295295
#else
296296
final_freq_mhz = clk_src_freq / (1 * 1000 * 1000);
297297
#endif

0 commit comments

Comments
 (0)