pico-sdk icon indicating copy to clipboard operation
pico-sdk copied to clipboard

Fixed an issue that caused incorrect settings when the SPI clock was …

Open aizaki77 opened this issue 1 year ago • 0 comments

…less than 244,141Hz.

Fixed an issue that caused incorrect settings when the SPI clock was less than 244,141Hz.

For example, if clk_peri is 125MHz and you specify 150kHz

Before correction prescale=2, postdiv=256, 125000000/(2*256)=244140.625Hz Therefore, it exceeds 150kHz.

After correction prescale=4, postdiv=209, 125000000/(4*209)=149521.5311004785Hz This is the correct frequency.

aizaki77 avatar Feb 11 '24 03:02 aizaki77