Skip to content

Commit

Permalink
Better startup stability for PicoGUS 2.0 boards
Browse files Browse the repository at this point in the history
  • Loading branch information
polpo committed Nov 16, 2023
1 parent 49e2a45 commit 303d1f4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
3 changes: 3 additions & 0 deletions sw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ project(picogus
LANGUAGES C CXX ASM
)

set(PICO_BOARD_HEADER_DIRS ${CMAKE_CURRENT_LIST_DIR})
set(PICO_BOARD picogus2)

# set(PICO_DEOPTIMIZED_DEBUG "1")
set(CMAKE_BUILD_TYPE "Release")
set(PICO_COPY_TO_RAM 1)
Expand Down
4 changes: 2 additions & 2 deletions sw/picogus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,12 +602,12 @@ int main()
}
gpio_set_mask(LED_PIN);
printf("Waiting for board to stabilize... ");
busy_wait_ms(500);
busy_wait_ms(250);
// Overclock!
printf("Overclocking... ");
vreg_set_voltage(VREG_VOLTAGE_1_30);
// vreg_set_voltage(VREG_VOLTAGE_1_15);
busy_wait_ms(500);
busy_wait_ms(250);
set_sys_clock_khz(rp2_clock, true);
gpio_xor_mask(LED_PIN);
#ifdef ASYNC_UART
Expand Down
13 changes: 13 additions & 0 deletions sw/picogus2.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Board config file for PicoGUS 2.0, also compatible with the Pi Pico

#ifndef _BOARDS_PICOGUS2_H
#define _BOARDS_PICOGUS2_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.h"
#endif

0 comments on commit 303d1f4

Please sign in to comment.