Question about Raspberry Pi Pico-SPI(SCK) frequency #14232
Replies: 2 comments
-
Oh well … online sources. A look at the datasheet reveals that the uppermost rate would be 1/2 of the ›clk_peri‹ MicroPython v1.22.1 on 2024-01-05; Raspberry Pi Pico with RP2040 from machine import SPI
spi = SPI(0)
spi.init(baudrate=125_000_000)
print(spi)
# SPI(0, baudrate=62500000, polarity=0, phase=0, bits=8, sck=18, mosi=19, miso=16)
machine.freq(120_000000)
spi.init(baudrate=120_000_000)
print(spi)
# SPI(0, baudrate=24000000, polarity=0, phase=0, bits=8, sck=18, mosi=19, miso=16) |
Beta Was this translation helpful? Give feedback.
-
The highest baud rate your can get is CPU_FREQ / 2. At 125MHz this is 62.5 MHz, which is indeed achieved. But only after hard reset or power up. There is a side effect with setting the clock frequency using machine.freq(). When doing that, the peripheral frequency is set to 48 MHz, reducing the maximum SPI freq to 24 MHz. See discussion #13679 and PR #13718. There is no conclusion yet on how to proceed |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, guys!
I am studying micropython with Raspberry Pi Pico, using SPI to send the SCK signal and it can only achieve a maximum frequency of approximately 5MHz in practice(by Kingst Logic Analyzer), although online sources say that it supports up to 125MHz.
The difference between 5M and 125M is too much, why is it so?
Beta Was this translation helpful? Give feedback.
All reactions