Skip to content

boards/arm/rp23xx: add Raspberry Pi Pico 2 W board (CYW43439 Wi-Fi)#19249

Closed
ricardgb wants to merge 26 commits into
apache:masterfrom
ricardgb:rp23xx-raspberrypi-pico-2-w
Closed

boards/arm/rp23xx: add Raspberry Pi Pico 2 W board (CYW43439 Wi-Fi)#19249
ricardgb wants to merge 26 commits into
apache:masterfrom
ricardgb:rp23xx-raspberrypi-pico-2-w

Conversation

@ricardgb

@ricardgb ricardgb commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

⚠️ Disclosure: this board port and the RP2350 PIO-gSPI CYW43439 driver were developed with Claude Code (an AI coding agent) and validated on real Pico 2 W hardware. Please review accordingly.

Summary

Adds a board port for the Raspberry Pi Pico 2 W (RP2350 + Infineon CYW43439), the Wi-Fi variant of the Pico 2. It reuses the existing raspberrypi-pico-2 port and adds support for the onboard CYW43439 Wi-Fi device.

The CYW43439 is driven through a new RP2350 PIO-based gSPI transport (arch/arm/src/rp23xx/rp23xx_cyw43439.c) that plugs into NuttX's existing bcm43xxx/bcmf FullMAC driver — the same driver the RP2040 raspberrypi-pico-w uses. The WL pins (WL_REG_ON=GPIO23, WL_DATA=GPIO24, WL_CS=GPIO25, WL_CLK=GPIO29) match the official pico-sdk pico2_w.h.

A telnet defconfig associates to an AP over WPA2 (NETINIT_WAPI), obtains a DHCP lease, and exposes an NSH shell over TCP/telnet.

The CYW43439 firmware blob is not included — it is proprietary and fetched from pico-sdk / the cyw43-driver exactly as the RP2040 Pico W port does; CONFIG_CYW43439_FIRMWARE_BIN_PATH points at it and it is embedded at build time.

Impact

  • New: boards/arm/rp23xx/raspberrypi-pico-2-w/ and arch/arm/src/rp23xx/rp23xx_cyw43439.{c,h}.
  • No existing board/arch behaviour changes: the arch/arm/src/rp23xx/{Make.defs,CMakeLists.txt} additions compile the new driver only under CONFIG_IEEE80211_INFINEON_CYW43439; boards/Kconfig gains the new board registration.

Testing

  • Build: ./tools/configure.sh raspberrypi-pico-2-w:telnet && make (arm-none-eabi-gcc) links to nuttx.uf2; nxstyle clean on all new files.
  • Hardware: flashed to a real Pico 2 W. The CYW43439 came up over PIO-gSPI (no clock tuning needed), associated to a WPA2 AP, obtained a DHCP lease, and served an NSH shell over telnet:
    NuttX ... arm raspberrypi-pico-2-w
    wlan0  Link encap:Ethernet HWaddr 88:a2:9e:..  RUNNING
           inet addr:192.168.0.43  Mask:255.255.255.0
    

🤖 Generated with Claude Code

michallenc and others added 26 commits March 27, 2026 17:05
If power down mode is set, trying to read ID ends in an infinite loop
because w25_waitwritecomplete never returns as status register never
signalizes write complete. Therefore ensure the device is not in a
power down mode before trying to read from it.

This can be an issue if the board is trying to check for more NOR
memories on one SPI bus and one chip select. For example GD25 driver
returns the memory to power down state after read id is finished,
therefore board initialization is stuck in an infinite loop if it first
checks for GD25 and then fallbacks to W25.

The commit fixes the possible issue by ensuring W25 is brought back
to normal operation mode before trying to obtain the manufacturer ID.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
When using a dummy memory address in DMA LLI transfers,
do not update the memory address.

Signed-off-by: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com>
Fix error: Case statement should be on a new line.

Signed-off-by: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com>
This commit fixed code comment typo in telnet.c.

Signed-off-by: Shunchao Hu <ankohuu@gmail.com>
…heck

Remove the unnecessary CONFIG_RPMSG_UART_CONSOLE preprocessor guard around
the console registration logic in uart_rpmsg_init().

The uart_rpmsg_init() function already accepts a bool isconsole parameter to
dynamically control console registration, which is designed to support flexible
console setup in distributed multi-core SOC systems. Adding the macro check on
top of this runtime parameter is redundant and negates the dynamic registration
capability.

This change fixes a regression introduced by PR apache#18410, which broke the functionality
of sim/rpproxy and sim/rpserver due to the incorrect macro guard preventing proper
console registration for the rpmsg UART device.

Signed-off-by: chao an <anchao.archer@bytedance.com>
fix compilation warning:

   group/group_foreachchild.c:85:10: warning: 'ret' may be used uninitialized [-Wmaybe-uninitialized]
   85 |   return ret;
      |          ^~~
   group/group_foreachchild.c:67:7: note: 'ret' was declared here
   67 |   int ret;

Signed-off-by: raiden00pl <raiden00@railab.me>
Fix adc_oversample() where priv->trovs (a bool, 0 or 1) was OR'd
directly into setbits instead of using ADC_CFGR2_TROVS (bit 9).
This caused triggered oversampling to never actually be enabled.

Fix ANIOC_WDOG_UPPER and ANIOC_WDOG_LOWER ioctls where the TR1
register was overwritten with only the new threshold value, zeroing
out the opposite threshold and the AWDFILT digital filter bits.
Use read-modify-write to preserve the other fields.

Signed-off-by: kywwilson11 <kwilson@2g-eng.com>
Ignore unsupported telnet subnegotiation payload until `IAC SE` so
option bytes do not leak into the first NSH command.

Keep existing NAWS handling intact and also treat `IAC IAC` inside
subnegotiation payload as an escaped `0xFF` data byte rather than a
subnegotiation terminator.

This makes subnegotiation parsing RFC-compliant for both unsupported
options and NAWS payload processing.

Signed-off-by: Shunchao Hu <ankohuu@gmail.com>
fix USART 1 pins for boards/nucleo-c0 boards

Signed-off-by: raiden00pl <raiden00@railab.me>
…ING.md.

Fix multiple documentation issues in README.md and CONTRIBUTING.md:
* README.md: Merge multi-line badge markdown into single lines for
  License and Contributors badges to follow standard markdown format.
* CONTRIBUTING.md: Remove extra space in Inviolable Principles link URL.
* CONTRIBUTING.md: Fix duplicate numbering in section 1.17 Merge rules
  (two items numbered 3, renumbered to 3, 4, 5).
* CONTRIBUTING.md: Fix typo in section 2.2 commit template example,
  "different thing" to "different things" (missing plural).

Signed-off-by: aiduxiaoxiong <aiduxiaoxiong@users.noreply.github.com>
Fix a crash scenarion due to stack overflow when debug assertions are
enabled.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
Fixes a crash when executing basic commands on the efuse defconfig.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
The WiFi driver refactor (662c1e0) renamed the Kconfig symbol
from CONFIG_ESPRESSIF_WLAN to CONFIG_ESPRESSIF_WIFI, but several
ESP32-S3 board bringup files were not updated. This caused
board_wlan_init() to be compiled out, so the wlan0 interface
never appeared.

Update the preprocessor guards in all affected boards:
  - esp32s3-box
  - esp32s3-eye
  - esp32s3-korvo-2
  - esp32s3-lcd-ev
  - lckfb-szpi-esp32s3

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
case: when rndis receive a packet and this packet is going to be forwarded.
1. first lock happen when ipv4_dev_forward call ipv4_nat_outbound;
2. next lock is: ipv4_nat_outbound_entry_find --> nat_port_select --> tcp_selectport
   --> nat_port_inuse

Signed-off-by: Jerry Ma <shichunma@bestechnic.com>
If call nat_enable twice, there will be a miss "nat_unlock".

Signed-off-by: Jerry Ma <shichunma@bestechnic.com>
Add space after 'else if' keyword to follow NuttX coding style
guidelines.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Fix MAC address byte order by reversing 6 bytes after reading
from eFuse. Adjust offset logic to apply after byte reversal,
ensuring Ethernet MAC is base_mac +3. Comply with Espressif's
MAC address generation specification for ESP32S3

Signed-off-by: nuttxs <zhaoqing.zhang@sony.com>
* Fix GPIO unspecified behavior on some GPIO ports.
* Fix GPIO undefined behavior caused by uncleared set or reset bits.

Signed-off-by: Saurav Pal <resyfer.dev@gmail.com>
GPIO PIN base address calculation had double right shift, thus call
to SAM_PION_BASE was always with port = 0 instead of correct port
number. As a result, function sam_gpioirq didn't correctly configure
additional interrupt modes (only rising or falling edge and level
interrupts).

The issue occured on SAMv7 and SAM34 platforms (likely copy-pasted
from one to another).

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
Print user exception reason class and description
Print register dump

Signed-off-by: Jari Nippula <jari.nippula@tii.ae>
It's a more friendly when output cmd in hex mode, since it's defined like: 0x7xx

Signed-off-by: Jerry Ma <shichunma@bestechnic.com>
Fix the issue where clock_gettime(CLOCK_MONOTONIC) always returns 0 in
tickless mode, caused by the scheduler tick counter (g_system_ticks) not
being updated with the actual timer ticks.

1. Add clock_update_sched_ticks() function to sched/clock/clock_sched_ticks.c:
  a. This function directly sets the system tick counter to a specific value
     (vs incrementing in clock_increase_sched_ticks), with full documentation
     matching the existing code style.
  b. Uses seqlock to ensure thread-safe access to g_system_ticks.

2. Call clock_update_sched_ticks() in nxsched_process_timer() (sched_processtickless.c):

  a. Syncs the scheduler tick counter with the actual timer ticks retrieved via up_timer_gettick().

With this fix, g_system_ticks is properly updated in tickless mode,
and clock_gettime(CLOCK_MONOTONIC) returns the correct non-zero monotonic time.

Signed-off-by: chao an <anchao.archer@bytedance.com>
This enhances the bringup file with /dev/userleds registration if
CONFIG_USERLED option is set.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
…CRITMONITOR

Fix the abnormal CPU usage statistics issue caused by missing update
of run_start timestamp in the target task (to) TCB when the CPU load
counting mode is SCHED_CPULOAD_CRITMONITOR.

Before this fix, the to->run_start was not set when switching context,
leading to incorrect CPU usage calculation (e.g., Idle_Task showed 52.9%
CPU usage instead of 100%, and running tasks had wrong non-zero values).
After fixing, the CPU statistics return to normal: Idle_Task correctly
shows 100% usage, and non-running tasks show 0% as expected.

Enable:
+CONFIG_SCHED_CPULOAD_CRITMONITOR=y
+CONFIG_SCHED_CRITMONITOR=y

Before:
nsh> ps
  TID   PID  PPID PRI POLICY   TYPE    NPX STATE    EVENT     SIGMASK            STACK    CPU COMMAND
    0     0     0   0 FIFO     Kthread   - Ready              0000000000000000 0069584 52.9% Idle_Task
    1     0     0 224 FIFO     Kthread   - Waiting  Semaphore 0000000000000000 0067456  0.0% sim_loop_wq 0x7b4417a003f0 0x7b4417a00470
    2     0     0 224 FIFO     Kthread   - Waiting  Semaphore 0000000000000000 0067464 17.6% hpwork 0x4014dba0 0x4014dc20
    3     3     0 100 FIFO     Task      - Running            0000000000000000 0067496 36.8% nsh_main

After:
nsh> ps
  TID   PID  PPID PRI POLICY   TYPE    NPX STATE    EVENT     SIGMASK            STACK    CPU COMMAND
    0     0     0   0 FIFO     Kthread   - Ready              0000000000000000 0069584 100.0% Idle_Task
    1     0     0 224 FIFO     Kthread   - Waiting  Semaphore 0000000000000000 0067456  0.0% sim_loop_wq 0x7646932003f0 0x764693200470
    2     0     0 224 FIFO     Kthread   - Waiting  Semaphore 0000000000000000 0067464  0.0% hpwork 0x4014dba0 0x4014dc20
    3     3     0 100 FIFO     Task      - Running            0000000000000000 0067496  0.0% nsh_main

This issue was introduced by PR apache#17075, where the run_start update for the
target task was omitted in the SCHED_CPULOAD_CRITMONITOR branch.

Signed-off-by: chao an <anchao.archer@bytedance.com>
Add release notes for 12.13.0 release

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Add a board port for the Raspberry Pi Pico 2 W (RP2350 + Infineon
CYW43439).  The board reuses the existing raspberrypi-pico-2 port and
adds support for the onboard CYW43439 Wi-Fi device, driven through a new
RP2350 PIO-based gSPI transport (arch/arm/src/rp23xx/rp23xx_cyw43439.c)
that plugs into NuttX's existing bcm43xxx (bcmf) FullMAC driver.

A telnet defconfig is provided that associates to an AP (NETINIT WAPI),
obtains a DHCP lease, and exposes an NSH shell over TCP/telnet.

This board port and the RP2350 PIO-gSPI CYW43439 driver were developed
with Claude Code (Anthropic's agentic coding tool) and validated on real
Pico 2 W hardware: Wi-Fi association, DHCP, and a TCP/telnet session over
the CYW43439.

Signed-off-by: Ricard Rosson <ricard@groundbits.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@linguini1

Copy link
Copy Markdown
Contributor

AI slop.

@linguini1 linguini1 closed this Jul 1, 2026
@ricardgb

ricardgb commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #19250 — this one auto-closed during a force-push while I rebased the branch onto current master to fix an unrelated diff (the branch had been based on the 12.13.0 release commit). #19250 has the clean 30-file, additive diff.

@cederom cederom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change touches too many things outside its declared scope of adding a new board - it also impacts many other boards and areas which - please see https://nuttx.apache.org/docs/latest/contributing/guide.html.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.