Skip to content

Commit

Permalink
HACK: pico: less overclock for PicoVision
Browse files Browse the repository at this point in the history
It doesn't like 250
  • Loading branch information
Daft-Freak committed Sep 19, 2023
1 parent 7f7051c commit 34ac6b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions 32blit-pico/display_picovision.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "display.hpp"

#include "pico/stdlib.h"

#include "config.h"

#include "dv_display.hpp"
Expand All @@ -16,6 +18,11 @@ static void vsync_callback(uint gpio, uint32_t events){
}

void init_display() {
// bit of a hack overriding clock here, but 250 does not work
#if OVERCLOCK_250
set_sys_clock_khz(216000, true);
#endif

display.init(DISPLAY_WIDTH, DISPLAY_HEIGHT, pimoroni::DVDisplay::MODE_RGB555);

gpio_set_irq_enabled_with_callback(16/*VSYNC*/, GPIO_IRQ_EDGE_RISE, true, vsync_callback);
Expand Down
2 changes: 1 addition & 1 deletion 32blit-pico/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ int main() {
// this is required for a stable 250MHz on some RP2040s
vreg_set_voltage(VREG_VOLTAGE_1_20);
sleep_ms(10);
set_sys_clock_khz(250000, false);
set_sys_clock_khz(250000, true);
#endif

stdio_init_all();
Expand Down

0 comments on commit 34ac6b7

Please sign in to comment.