raspberrypi / pico-playground

BSD 3-Clause "New" or "Revised" License
445 stars 96 forks source link

sprite_demo fails on VGA board #11

Closed 8bitkick closed 3 years ago

8bitkick commented 3 years ago

Built with PICO_BOARD=vgaboard the sprite_demo fails immediately at runtime with the following message:

*** PANIC ***
System clock (192000000) must be an integer multiple of the requested pixel clock (25000000).

Changing the sys clock value to a multiple of 25MHz succeeds. Seemed to need 250MHz to render the whole screen but the OC is unstable after a minute or so on my Pimoroni VGA demo board:

set_sys_clock_khz(250000, true);

This may well not be the right fix :)

lurch commented 3 years ago

What if you set a sys clock of 125MHz? (I'm just guessing as I've not got a VGA board myself!) That was the speed that the RP2040 chips were going to run at by default, and it was only later that they got bumped to 133MHz.

8bitkick commented 3 years ago

Could well be right there this might have just been missed during this 125MHz update https://github.com/raspberrypi/pico-playground/commit/ef3bdfab11801d390f05e0cf52dd57fcab8b22cc ... I’ll give it a try

8bitkick commented 3 years ago

...ok 125MHz sys clock just renders a small slice of the screen. I guess there are some magic settings I'm missing here

kilograham commented 3 years ago

set PICO_SCANVIDEO_48MHZ=1 in the cmakelists.txt

kilograham commented 3 years ago

fixe