Skip to content

SDK version 1.4.0

Compare
Choose a tag to compare
@kilograham kilograham released this 30 Jun 06:59
· 261 commits to master since this release

This release adds wireless support for the Raspberry Pi Pico W, adds support for other new boards, and contains various
bug fixes, documentation improvements, and minor improvements/added functionality. You can see the full list of individual commits here.

New Board Support

The following boards have been added and may be specified via PICO_BOARD:

  • pico_w
  • datanoisetv_rp2040_dsp
  • solderparty_rp2040_stamp_round_carrier

Wireless Support

  • Support for the Raspberry Pi Pico W is now included with the SDK (PICO_BOARD=pico_w). The Pico W uses a driver
    for the wireless chip called cyw43_driver which is included as a submodule of the SDK. You need to initialize
    this submodule for Pico W wireless support to be available. Note that the LED on the Pico W board is only
    accessible via the wireless chip and can be accessed via cyw43_arch_gpio_put() and
    cyw43_arch_gpio_get() (part of the pico_cyw43_arch library described below). As a result of the LED being on
    the wireless chip, there is no PICO_DEFAULT_LED_PIN setting and the default LED based examples in pico-examples
    do not work with the Pico W.

  • IP support is provided by lwIP which is also included as a
    submodule which you should initialize if you want to use it.

    The following libraries exposing lwIP functionality are provided by the SDK:

    • pico_lwip_core (included in pico_lwip)
    • pico_lwip_core4 (included in pico_lwip)
    • pico_lwip_core6 (included in pico_lwip)
    • pico_lwip_netif (included in pico_lwip)
    • pico_lwip_sixlowpan (included in pico_lwip)
    • pico_lwip_ppp (included in pico_lwip)
    • pico_lwip_api (this is a blocking API that may be used with FreeRTOS and is not included in pico_lwip)

    As referenced above, the SDK provides a pico_lwip which aggregates all of the commonly needed lwIP functionality.
    You are of course free to use the substituent libraries explicitly instead.

    The following libraries are provided that contain the equivalent lwIP application support:

    • pico_lwip_snmp
    • pico_lwip_http
    • pico_lwip_makefsdata
    • pico_lwip_iperf
    • pico_lwip_smtp
    • pico_lwip_sntp
    • pico_lwip_mdns
    • pico_lwip_netbios
    • pico_lwip_tftp
    • pico_lwip_mbedtls
  • Integration of the IP stack and the cyw43_driver network driver into the user's code is handled by
    pico_cyw43_arch. Both the IP stack and the driver need to do work in response to network traffic, and
    pico_cyw43_arch provides a variety of strategies for servicing that work. Four architecture variants
    are currently provided as libraries:

    • pico_cyw43_arch_lwip_poll - For using the RAW lwIP API (NO_SYS=1 mode) with polling. With this architecture
      the user code must periodically poll via cyw43_arch_poll() to perform background work. This architecture
      matches the common use of lwIP on microcontrollers, and provides no multicore safety
    • pico_cyw43_arch_lwip_threadsafe_background - For using the RAW lwIP API (NO_SYS=1 mode) with multicore
      safety, and automatic servicing of the cyw43_driver and
      lwIP in the background. User polling is not required with this architecture, but care should be taken as lwIP
      callbacks happen in an IRQ context.
    • pico_cyw43_arch_lwip_sys_freertos - For using the full lwIP API including blocking sockets in OS mode
      (NO_SYS=0), along with multicore/task safety, and automatic servicing of the cyw43_driver and the lwIP
      stack in a separate task. This powerful architecture works with both SMP and non-SMP variants of the RP2040 port
      of FreeRTOS-Kernel. Note you must set FREERTOS_KERNEL_PATH in your build to use this variant.
    • pico_cyw43_arch_none - If you do not need the TCP/IP stack but wish to use the on-board LED or other wireless
      chip connected GPIOs.

    See the library documentation or the pico/cyw43_arch.h header for more details.

Notable Library Changes/Improvements

hardware_dma

  • Added dma_unclaim_mask() function for un-claiming multiple DMA channels at once.
  • Added channel_config_set_high_priority() function to set the channel priority via a channel config object.

hardware_gpio

  • Improved the documentation for the pre-existing gpio IRQ functions which use the "one callback per core" callback
    mechanism,
    and added a gpio_set_irq_callback() function to explicitly set the callback independently of enabling per pin GPIO
    IRQs.

  • Reduced the latency of calling the existing "one callback per core" GPIO IRQ callback.

  • Added new support for the user to add their own shared GPIO IRQ handler independent of the pre-existing
    "one callback per core" callback mechanism, allowing for independent usage of GPIO IRQs without having to share one
    handler.
    See
    the
    documentation in hardware/irq.h for full details of the functions added:

    • gpio_add_raw_irq_handler()
    • gpio_add_raw_irq_handler_masked()
    • gpio_add_raw_irq_handler_with_order_priority()
    • gpio_add_raw_irq_handler_with_order_priority_masked()
    • gpio_remove_raw_irq_handler()
    • gpio_remove_raw_irq_handler_masked()
  • Added a gpio_get_irq_event_mask() utility function for use by the new "raw" IRQ handlers.

hardware_irq

  • Added user_irq_claim(), user_irq_unclaim(), user_irq_claim_unused() and user_irq_is_claimed()
    functions for claiming ownership of the user IRQs (the ones numbered 26-31 and not connected to any hardware).
    Uses of the user IRQs have been updated to use these functions. For stdio_usb, the PICO_STDIO_USB_LOW_PRIORITY_IRQ define is still respected if specified, but otherwise an unclaimed one is
    chosen.
  • Added an irq_is_shared_handler() function to determine if a particular IRQ uses a shared handler.

pico_sync

  • Added a sem_try_acquire() function, for non blocking acquisition of a semaphore.

pico_stdio

  • stderr is now supported and goes to the same destination as stdout.
  • Zero timeouts for getchar_timeout_us() are now correctly honored (previously they were a 1us minimum).

stdio_usb

  • stdio over USB can now be used even if you are linking to tinyusb_device yourself. If you have a CDC device in your device descriptors, you can use pico_enable_stdio_usb(TARGET 1) in your CMakeLists.txt
  • The use of a 1ms timer to handle background TinyUSB work has been replaced with use of a more interrupt driven
    approach using a user IRQ for better performance. Note this new feature is disabled if shared IRQ handlers
    are disabled via PICO_DISABLE_SHARED_IRQ_HANDLERS=1

miscellaneous

  • get_core_num() has been moved to pico/platform.h from hardware/sync.h.
  • The C library function realloc() is now multicore safe too.
  • The minimum PLL frequency has been increased from 400Mhz to 750Mhz to improve stability across operating
    conditions. This should not affect the majority of users in any way, but may impact those trying to set
    particularly low clock frequencies. If you do wish to return to the previous
    minimum, you can set PICO_PLL_VCO_MIN_FREQ_MHZ back to 400. There is also a new PICO_PLL_VCO_MAX_FREQ_MHZ
    which defaults to 1600.

Build

  • Compilation with GCC 12 is now supported.