Skip to content

Commit

Permalink
Avoid throttle down by using picow_fast board def
Browse files Browse the repository at this point in the history
  • Loading branch information
polpo committed Aug 23, 2024
1 parent 2b8e5f6 commit cf944fa
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
working-directory: ${{github.workspace}}/build
run: |
mkdir -p $OUTPUT_DIR
cmake $GITHUB_WORKSPACE/sw -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPROJECT_TYPE="NE2K" -DPICO_BOARD=pico_w #-DUSE_LTO=1
cmake $GITHUB_WORKSPACE/sw -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPROJECT_TYPE="NE2K" -DPICO_BOARD=picow_fast #-DUSE_LTO=1
cmake --build . --config $BUILD_TYPE --parallel $(nproc)
cp pg-ne2k.uf2 $OUTPUT_DIR/pg-ne2k.uf2
Expand Down
1 change: 0 additions & 1 deletion sw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,6 @@ function(build_ne2k TARGET_NAME MULTIFW)
target_link_libraries(
${TARGET_NAME}
ne2000
pico_cyw43_arch_none
)
endfunction()

Expand Down
2 changes: 0 additions & 2 deletions sw/ne2000play.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@ extern uint LED_PIN;
void play_ne2000() {
//flash_safe_execute_core_init();
puts("starting core 1 ne2000");
set_sys_clock_khz(240000, true);//temporary hack because of board definition flash divider
PG_EnableWifi();
PG_Wifi_Connect(settings.WiFi.ssid, settings.WiFi.password);
set_sys_clock_khz(366000, true);

static bool flag = false;
while(1) {
Expand Down
12 changes: 0 additions & 12 deletions sw/picow-fast.h

This file was deleted.

17 changes: 17 additions & 0 deletions sw/picow_fast.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Board config file for overclocked Pico W

// The below lines aren't just comments - they're directives to the Pico SDK cmake system
// pico_cmake_set PICO_PLATFORM = rp2040
// pico_cmake_set PICO_CYW43_SUPPORTED = 1

#ifndef _BOARDS_PICOW_FAST_H
#define _BOARDS_PICOW_FAST_H

// Allow extra time for xosc to start.
#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64

// Slower flash to assist restarts when flashing on the fly
#define PICO_FLASH_SPI_CLKDIV 4

#include "boards/pico_w.h"
#endif

0 comments on commit cf944fa

Please sign in to comment.