raspberrypi / pico-sdk

BSD 3-Clause "New" or "Revised" License
3.66k stars 911 forks source link

set_sys_clock_khz not work under 20 MHz with sdk 1.5.1 #1658

Closed hodlemil closed 7 months ago

hodlemil commented 7 months ago

set_sys_clock_khz not work under 20000 kHz. I try with 19000,12000,10000 with sdk version 1.5.1. The attached source code work without problem with sdk version 1.3.1, but not work with sdk version 1.5.1. What changes between sdk version 1.3.1 and 1.5.1. to make int notwork?

set_sys_clock_rp2040.zip

lurch commented 7 months ago

I wonder if that might be related to #1272 ?

peterharperuk commented 7 months ago

Any idea @andygpz11

hodlemil commented 7 months ago

The answer was in the changelog. In cmakelists.txt target_compile_definitions(cam-sw PRIVATE PICO_PLL_VCO_MIN_FREQ_MHZ=400 ) solved the problem, because new sdk set this define to 700 the 1.3.1 sdk sets to 400

peterharperuk commented 7 months ago

Great - you can close this when you're ready.