Skip to content

Commit

Permalink
Make iperf example work with an RM2 breakout board
Browse files Browse the repository at this point in the history
To use a an RM2 breakout board with a "normal" pico you have to tell
cmake that it supports cyw43 and you have to add the default "pins" to
use to your project.

When building the project pass -DPICO_CYW43_SUPPORTED=1 on the cmake
command line.

cmake -D .. -DPICO_CYW43_SUPPORTED=1

In your project add pin definitions as in this change where WL_ON=2,
CS=3, DAT=4 (in out and wake) and CLK=5. For Pico you seem to have to
slow the pio clock down as well so set div int to 3.

This will only work with the latest SDK 2.1.0.
  • Loading branch information
peterharperuk committed Nov 28, 2024
1 parent b6ac07f commit 9934c13
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions pico_w/wifi/iperf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@ add_executable(picow_iperf_server_background
target_compile_definitions(picow_iperf_server_background PRIVATE
WIFI_SSID=\"${WIFI_SSID}\"
WIFI_PASSWORD=\"${WIFI_PASSWORD}\"

CYW43_DEFAULT_PIN_WL_REG_ON=2
CYW43_DEFAULT_PIN_WL_CS=3
CYW43_DEFAULT_PIN_WL_DATA_OUT=4
CYW43_DEFAULT_PIN_WL_DATA_IN=4
CYW43_DEFAULT_PIN_WL_HOST_WAKE=4
CYW43_DEFAULT_PIN_WL_CLOCK=5
CYW43_PIO_CLOCK_DIV_INT=3
)

target_include_directories(picow_iperf_server_background PRIVATE
${CMAKE_CURRENT_LIST_DIR}
${CMAKE_CURRENT_LIST_DIR}/.. # for our common lwipopts
Expand All @@ -22,6 +31,14 @@ add_executable(picow_iperf_server_poll
target_compile_definitions(picow_iperf_server_poll PRIVATE
WIFI_SSID=\"${WIFI_SSID}\"
WIFI_PASSWORD=\"${WIFI_PASSWORD}\"

CYW43_DEFAULT_PIN_WL_REG_ON=2
CYW43_DEFAULT_PIN_WL_CS=3
CYW43_DEFAULT_PIN_WL_DATA_OUT=4
CYW43_DEFAULT_PIN_WL_DATA_IN=4
CYW43_DEFAULT_PIN_WL_HOST_WAKE=4
CYW43_DEFAULT_PIN_WL_CLOCK=5
CYW43_PIO_CLOCK_DIV_INT=3
)
target_include_directories(picow_iperf_server_poll PRIVATE
${CMAKE_CURRENT_LIST_DIR}
Expand Down

0 comments on commit 9934c13

Please sign in to comment.