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

pico_cyw43_driver/cyw43_bus_pio_spi.c: make SPI_PROGRAM_NAME and CLOC…

Open mvds00 opened this issue 2 years ago • 3 comments

Fixes #1498

This patch allows to override the default value for SPI_PROGRAM_NAME and CLOCK_DIV in src/rp2_common/pico_cyw43_driver/cyw43_bus_pio_spi.c by defining CYW43_SPI_PROGRAM_NAME and/or CYW43_PIO_CLOCK_DIV.

This is useful when other cpu speeds are involved, e.g. running the Pi Pico W at 12 MHz from xosc.

mvds00 avatar Sep 08 '23 21:09 mvds00

It would be nice to have full range of cpu speeds at runtime for Pico W.

matsobdev avatar Oct 20 '23 19:10 matsobdev

I fully agree @matsobdev, the potential for power efficient applications is huge. But it involves a lot of changes. Running from xosc at 12 MHz with pll_sys disabled for example, is currently not possible using build settings alone. I think the first step in having the full range of cpu speeds available, would be to make the cpu speed and everything depending on it configurable at build time.

mvds00 avatar Oct 21 '23 08:10 mvds00

See also #1521 which allows the default clock divisor to be overridden at runtime, which is useful for Micropython etc. Both patches look like they can merge with each other without issue.

ai6aj avatar Oct 22 '23 18:10 ai6aj