Skip to content

Commit e1f1880

Browse files
committed
rp2/flash: Solve the problem that the flash clock frequency is too high and XIAO RP2350 cannot be used normally.
Signed-off-by: Lesords <lesords168@gmail.com>
1 parent bbdc832 commit e1f1880

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ports/rp2/rp2_flash.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ static bool use_multicore_lockout(void) {
104104
// and core1 locked out if relevant.
105105
static void __no_inline_not_in_flash_func(rp2_flash_set_timing_internal)(int clock_hz) {
106106

107-
// Use the minimum divisor assuming a 133MHz flash.
108-
const int max_flash_freq = 133000000;
107+
// Use the minimum divisor assuming a 60MHz flash.
108+
const int max_flash_freq = 60000000;
109109
int divisor = (clock_hz + max_flash_freq - 1) / max_flash_freq;
110110

111111
#if PICO_RP2350
@@ -115,7 +115,7 @@ static void __no_inline_not_in_flash_func(rp2_flash_set_timing_internal)(int clo
115115
}
116116

117117
// RX delay equal to the divisor means sampling at the same time as the next falling edge of SCK after the
118-
// falling edge that generated the data. This is pretty tight at 133MHz but seems to work with the Winbond flash chips.
118+
// falling edge that generated the data. This is pretty tight at 60MHz but seems to work with the Winbond flash chips.
119119
const int rxdelay = divisor;
120120
qmi_hw->m[0].timing = (1 << QMI_M0_TIMING_COOLDOWN_LSB) |
121121
rxdelay << QMI_M1_TIMING_RXDELAY_LSB |

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy