This is a minor release of the SDK with many bug fixes and documentation improvements, along with some new features.
Highlights are listed below, or you can see the full list of individual commits here, and the full list of resolved issues here.
Board Support
The following board has been added and may be specified via PICO_BOARD
:
adafruit_feather_rp2350
datanoisetv_rp2350_dsp
hellbender_0001
machdyne_werkzeug
pico2_w
pimoroni_pico_plus2_w_rp2350
sparkfun_thingplus_rp2350
The following board configurations have been modified:
pimoroni_plasma2350
- corrected flash size, renamed SPICE to SPCEpimoroni_tiny2350
- corrected flash size
Notable Library Changes/Improvements
Clock dividers in general
- A variety of methods which set clock dividers using an integer part and a fractional part, which might have been
hardware_xxx_set_clkdiv_int_frac(uint16_t div_int, uint8_t div_frac)
have been modified tohardware_xx_set_clkdiv_int_frac8(uint32_t div_int, uint8_t div_frac)
. This has been done for consistency and to make the APIs more resistant to hardware changes. The old APIs are preserved for backwards compatibility. - Previously, when converting from floating-point clock divider values to the fixed point use by the hardware, the floating-point value was rounded down. The new default (as configured by
PICO_CLKDIV_ROUND_NEAREST
) is to round to the nearest achievable value. This minor change in behavior was deemed better in general, which is why the default was changed. You may setPICO_CLKDIV_ROUND_NEAREST=0
to restore the previous beahvior by default (note that individual libraries have their own configuration values which can be used to change the behavior on a per-library basis).
cmsis
- Fixed exception renaming for RP2350
hardware_adc
- Added
PICO_ADC_CLKDIV_ROUND_NEAREST
for controlling rounding of floating-point clock dividers
hardware_clocks
- Corrected spelling of
PICO_CLOCK_AJDUST_PERI_CLOCK_WITH_SYS_CLOCK
toPICO_CLOCK_ADJUST_PERI_CLOCK_WITH_SYS_CLOCK
. The former is still supported. vco_calc.py
now outputsSYS_CLK_HZ
in the CMake output, which is required forclock_get_hz(clk_sys)
to return the correct value- Renamed
clock_gpio_init_int_frac()
toclock_gpio_init_int_frac8()
to be clear that it takes an 8-bit fraction; the old name is still supported. - Added
clock_gpio_init_int_frac16()
to specify the fraction with 16-bit precision (RP2350 has 16 bits of precision). This method can still be called on RP2040 in which case the low 8-bits are ignored. - Added
PICO_CLOCK_GPIO_CLKDIV_ROUND_NEAREST
for controlling rounding of floating-point clock dividers
hardware_dma
- Fixed
dma_channel_cleanup()
to disable the channel with the new DMA IRQs added in RP2350
hardware_exception
- Added missing Cortex-M33 exception numbers
hardware_flash
- Prevented flash functions
flash_range_eraae()
,flash_range_program()
andflash_do_cmd()
from trashing the user's CS1 QMI configuration on RP2350 - Fixed issue with
flash_safe_execute
on FreeRTOS SMP
hardware_i2c
- Added
i2c_write_burst_blocking
andi2c_read_burst_blocking
to send/receive multiple bytes without intervening stops. - Fixed rare hang during
i2c_read_blocking
hardware_interp
- Renamed
interp_add_accumulater()
tointerp_add_accumulator()
. The old incorrect spelling is still supported.
hardware_pio
- Added
pio_sm_set_pins64()
,pio_sm_set_pins_with_mask64()
andpio_sm_set_pindirs_with_mask64()
to allow setting of >32 pins. - Much improved documentation of how GPIO numbers > 32 are handled.
- Fixed a bug in the use of a "jmp pin" > 32.
- Fixed implementation of
sm_config_set_in_pin_count()
- Renamed
sm_config_set_clkdiv_int_frac()
tosm_config_set_clkdiv_int_frac8()
to be clear that it takes an 8-bit fraction; the old name is still supported. Note that "int" part in the new method is 32-bit not 16-bit for consistency with otherclkdiv
methods. - Renamed
pio_calculate_clkdiv_from_float()
topio_calculate_clkdiv8_from_float()
to be clear that it produces an 8-bit fraction; the old name is still supported. Note that "int" part in the new method is 32-bit not 16-bit for consistency with otherclkdiv
methods. - Added
PICO_PIO_CLKDIV_ROUND_NEAREST
for controlling rounding of floating-point clock dividers
hardware_pwm
- Renamed
pwm_config_set_clkdiv_int_frac()
topwm_config_set_clkdiv_int_frac4()
to be clear that it takes an 4-bit fraction; the old name is still supported. Note that "int" part in the new method is 32-bit not 8-bit for consistency with otherclkdiv
methods. - Added
PICO_PWM_CLKDIV_ROUND_NEAREST
for controlling rounding of floating-point clock dividers
hardware_timer
- Fixed bug with alarms when using RP2350's new TIMER1
- Corrected signature of
hardware_alarm_get_irq_num()
method added in SDK2.0.0. The variant that takes (and uses) a timer instance is calledtimer_hardware_alarm_get_irq_num()
.
pico_aon_timer
-
Added
aon_timer_start_calendar()
,aon_timer_set_time_calendar()
,aon_timer_get_time_calendar()
andaon_timer_enable_alarm_calendar()
methods. These are equivalent to the non-_calendar()
variants except they deal in calendar (date/) time, rather than time intervals.These new variants are preferred on RP2040 since otherwise a date/time conversion must be performed which pulls in a lot of C library code. For the same reason, the pre-existing variants are preferred on RP2350. This discrepancy results from the different hardware used for the AON timer on RP2040 and RP2350.
pico_atomic
- Fixed atomic use between core 0 and core 1
pico_async_context
- Fixed possible HardFault in
execute_sync()
on FreeRTOS
pico_binary_info
bi_Xpins_with_names()
macros now work correctly when pin numbers are not in order
pico_bootrom
- Added
rom_reset_usb_boot_extra()
which supports an "activity" GPIO pin > 32 and GPIO pin inversion (active low). - Bootrom methods that may write to flash are now protected with
flash_safe_execute()
. This affectsrom_flash_op()
and rom_explicit_buy()`
pico_bootsel_via_double_reset
- Fixed implementation on RP2350. Note the RP2350 bootrom also provides this support if enabled via OTP, however this library can be used when that is not enabled.
pico_crt0
__HeapLimit
is now correctly set by the default linker scripts again- Fixed linker option
-Wl,--print-memory-usage
showing 100% RAM used
pico_clib_interface
- Made Some small improvements to
picolibc
integration
pico_cyw43_driver
- Allow user configuration of Wi-Fi pins (including pin numbers >32) and SPI clock, including dynamic SPI clock configuration at runtime.
- Updated
cye43_driver
to revisioncf924bb
- Renamed
cyw43_set_pio_clkdiv_int_frac()
tocyw43_set_pio_clkdiv_int_frac8()
to be clear that it takes an 8-bit fraction; the old name is still supported. Note that "int" part in the new method is 32-bit not 16-bit for consistency with otherclkdiv
methods - Renamed
CYW43_PIO_CLOCK_DIV_FRAC8
toCYW43_PIO_CLOCK_DIV_FRAC
. The old name is still supported - RISC-V is now supported
- Added
PICO_BTSTACK_CYW43_MAX_HCI_PROCESS_LOOP_COUNT
configuration option, which can be used to prevent starvation in high frequency Bluetooth scenarios.
pico_flash
- Support serial flash with >8 byte unique id, using the last 8 bytes rather than the first
pico_float
- Added optimized add/sub/mul implemtations for Hazard3 for better floating point speed
pico_malloc
- Fixed deadlock in
calloc()
andrealloc()
withpicolibc
pico_platform
- Added
pico_default_asm_volatile_goto()
pico_standard_binary_info
- Added back
boot_stage2
binary info (missing in SDK 2.0.0)
pico_stdio_uart
- Fixed
stdio_flush()
when used withstdio_uart_init_full()
- Fixed race condition in
stdio_set_chars_available_callback()
pico_stdio_usb
- Fixed Windows issue with the device not showing up if the reset interface is disabled
- Added support for resetting to USB boot with an activity LED pin > 32 or with the LED active low (on RP2350)
- Added
PICO_STDIO_USB_RESET_BOOTSEL_FIXED_ACTIVITY_LED_ACTIVE_LOW
setting for RP2350
pico_time
- Fixed race condition which could cause alarms to be lost
- Fixed continuous wakeup in
best_effort_wfe_or_timeout()
on RP2350
pico_util
- Added
datetime_to_tm()
andtm_to_datetime()
for converting C library date/times to/from RP2040 RTC date/times - Added
pico_localtime_r()
andpico_mktime()
for use bypico_util
time conversion code. These methods cass the equivalent C library function, but are defined weakly so the user can provide their own
TinyUSB
- Updated TinyUSB to 0.17.0
New Libraries
boot_bootrom_headers
Split out the headers defining the bootrom interface - that might be used outside the SDK - from pico_bootrom
which is focused on calling the bootrom from the SDK, and has non-trivial dependencies.
hardware_xip_cache
Provides XIP cache maintenance APIs:
- RP2040 support for cache invalidation
- RP2350 support for cache invalidation/cleaning/pinning
Miscellaneous
- Numerous documentation corrections/improvements
- Various build warnings fixed in exotic compiler configuratons
- RP2350 A0/A1 silicon are no longer supported
Pioasm
- Fixed disassembly of
mov rx_fifo, ...
andmov ..., rx_fifo
instructions
Build
- Madebuild dependent on any signature files or embedded-partition-table JSON
- Added back
.hex
file output (lost in 2.0.0) - Made
PICO_FLASH_SIZE_BYTES
andPICO_CYW43_SUPPORTED
if specified in CMake, correctly affect the compiled code. - Various corrections to library dependencies
- Added
PANIC
andAUTO_INIT_MUTEX
options topico_minimize_runtime()
- Made
boot_stage2
build reproducible (same binary if no source changes)
Bazel Build
- Add support for building on Raspberry Pi OS
- More CMake build configuration options supported
- Preview support for Wi-Fi builds
Authors
Thanks to the following for their contributions:
anhnhancao,
Andrew Featherstone,
Andrew Burge,
Andrew Scheller,
Armando Montanez,
Caleb Jamison,
Chris Boross,
Dave Roth,
David Goffredo,
Dhiru Kholia,
Dranoel,
Dryw Wade,
Earle F. Philhower,
Giampiero Baggiani,
Graham Sanderson,
Gregory Neverov,
Hugh Nixon,
iCMDdev,
inc,
Ikko Eltociear Ashimine,
Jack Wilsdon,
jaguilar,
Koji KITAYAMA,
Liam Fraser,
Luke Wren,
Machdyne UG,
Matt Bennett,
Mete Balcı,
newbrain,
Nhan Cao,
Nikhil Dabas,
Peter Harper,
Petr Hosek,
Philip Howard,
Scott Shawcroft,
seesturm,
Stanislav Rubint,
Stefan Kerkmann,
Sylwester,
Taylor Cramer,
theshteves,
Thomas Watson,
Tobias Simetsreiter,
William Vinnicombe,
yh-sb