add PICO_USE_FASTEST_SUPPORTED_CLOCK, and support vreg setting and SYS_CLOCK_MHZ=200 for rp2040 #2285
No reviewers
Labels
No labels
bazel
bluetooth
board settings
boot_stage2
bug
build
c++
can't reproduce
clang
clib-interface
cmsis
code cleanliness
code size
compiler version issues
cyw43_driver
debug
discussion
documentation
duplicate
dynamic_clock
elf2uf2
enhancement
errata
filesystem
flash layout
floating point
FreeRTOS
hardware_adc
hardware_claim
hardware_clocks
hardware_dma
hardware_exception
hardware_flash
hardware_gpio
hardware_i2c
hardware_irq
hardware_pio
hardware_pwm
hardware_rcp
hardware_rtc
hardware_spi
hardware_sync
hardware_uart
hardware_vreg
hardware_watchdog
hardware_xosc
help wanted
host
IAR
installation
invalid
linker scripts
lto
lwip
mbedtls
missing API
needs reporter detail
networking
newlib
newlib-multicore
non-c
non-cmake
non-gcc
openocd
orphan PR
OS integration
pico_async_context
pico_base
pico_binary_info
pico_flash
picolibc
pico_lwip
pico_malloc
pico_multicore
pico_printf
pico_runtime
pico_stdio
pico_stdio_usb
pico_sync
pico_time
pico_util
pioasm
port
question
review
review2
rtos interop
runtime init
static library
svd
test
tinyusb
vscode
wifi integration
wontfix
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-raspberrypi/pico-sdk!2285
Loading…
Reference in a new issue
No description provided.
Delete branch "clock_voltage_and_speed"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Also adds
vreg_get_voltage()@ -47,2 +48,3 @@// The voltage limit can't be disabled on RP2040 (was implemented by hard-wiring the LDO controls)#elsepanic_unsupported();hw_set_bits(&powman_hw->vreg_ctrl, POWMAN_PASSWORD_BITS | POWMAN_VREG_CTRL_DISABLE_VOLTAGE_LIMIT_BITS);else if PICO_RP2350 / else panic?
Why is 1ms enough?
@ -64,0 +65,4 @@#ifndef PICO_USE_FASTEST_SUPPORTED_CLOCK#define PICO_USE_FASTEST_SUPPORTED_CLOCK 0#endifGiven that this setting is used by code within
rp2_common, would it make sense to also add thisPICO_CONFIG:to one of the rp2350 header files?IMO
SYS_CLK_VREG_VOLTAGE_MINis misnamed - it's a frequency scaling operating point, not a minimum. If you're not wanting to boost clk_sys then the "minimum" shouldn't be applied, as it just wastes power. Such OPPs are usually referred to as turbo/boost settings.There are a couple of small tweaks needed to stop
tools/extract_configs.pygetting upset...Empirically this seems to work for most people, but I'll make it a define
It is the minimum voltage for the requested sys_clock; i.e. its value is dependent on the sys clock you choose, and the clock setup will increase the current voltage if it is less than this
@ -47,2 +48,3 @@// The voltage limit can't be disabled on RP2040 (was implemented by hard-wiring the LDO controls)#elsepanic_unsupported();hw_set_bits(&powman_hw->vreg_ctrl, POWMAN_PASSWORD_BITS | POWMAN_VREG_CTRL_DISABLE_VOLTAGE_LIMIT_BITS);stylistically, we don't do that - might never be needed
@ -209,0 +228,4 @@#else#ifndef SYS_CLK_VREG_VOLTAGE_AUTO_ADJUST#define SYS_CLK_VREG_VOLTAGE_AUTO_ADJUST 0#endif"regular voltage" -> "regulator voltage" ?
This might be a stupid question, but given that there's a division by 1000000 in there, would it be possible to rearrange this calculation to not use 64-bit arithmetic? (given that we've already got at least one PR that is attempting to reduce the amount of 64-bit maths)
it is a compile time constant, so handled by the compiler