kopia lustrzana https://github.com/raspberrypi/pico-playground
default scanvideo to support 125mhz system clock for 640x480 - also means better compatibility as 25Mhz is better than 24Mhz when compared to 25.175Mhz
rodzic
97ef906b00
commit
ef3bdfab11
|
@ -67,5 +67,4 @@ Name|Description
|
|||
## Networking
|
||||
Name|Description
|
||||
---|---
|
||||
[usb_host_webserver](net/usb_host_webserver)| A simple web server implemented as
|
||||
|
||||
[usb_host_webserver](net/usb_host_webserver)| A simple web server
|
||||
|
|
|
@ -24,6 +24,8 @@ if (PICO_ON_DEVICE)
|
|||
VIDEO_DBI
|
||||
|
||||
PICO_SCANVIDEO_LINKED_SCANLINE_BUFFERS=1 # we do two rows at a time
|
||||
|
||||
#PICO_SCANVIDEO_48MHZ # still uses this for now
|
||||
)
|
||||
|
||||
target_link_libraries(popcorn
|
||||
|
|
|
@ -1617,7 +1617,11 @@ void setup_audio() {
|
|||
}
|
||||
|
||||
int main(void) {
|
||||
#if PICO_SCANVIDEO_48MHZ
|
||||
set_sys_clock_48mhz();
|
||||
#else
|
||||
set_sys_clock_khz(50000, true);
|
||||
#endif
|
||||
|
||||
#if USE_RGB_LOW_FOR_DEBUG_PINS
|
||||
gpio_dir_out_mask(0x421);
|
||||
|
|
|
@ -7,6 +7,7 @@ if (TARGET pico_scanvideo_dpi)
|
|||
|
||||
target_compile_definitions(demo1
|
||||
PRIVATE
|
||||
#PICO_SCANVIDEO_48MHZ
|
||||
# video overlay is distracting
|
||||
# PICO_SCANVIDEO_PLANE_COUNT=3
|
||||
)
|
||||
|
|
|
@ -43,17 +43,6 @@ bool render_scanline_test_pattern(struct scanvideo_scanline_buffer *dest, int co
|
|||
bool render_scanline_pi(struct scanvideo_scanline_buffer *dest, int core);
|
||||
|
||||
extern const struct scanvideo_pio_program video_24mhz_composable;
|
||||
const struct scanvideo_mode vga_mode_320x256_60 =
|
||||
{
|
||||
.default_timing = &vga_timing_640x480_60_default,
|
||||
.pio_program = &video_24mhz_composable,
|
||||
.width = 320,
|
||||
.height = 256,
|
||||
.xscale = 2,
|
||||
.yscale = 480,
|
||||
.yscale_denominator = 256
|
||||
};
|
||||
|
||||
|
||||
//#define vga_mode vga_mode_1080p
|
||||
//#define vga_mode vga_mode_720p
|
||||
|
@ -612,7 +601,9 @@ int main(void) {
|
|||
|
||||
gpio_put(27, 0);
|
||||
#if PICO_ON_DEVICE && !PICO_ON_FPGA
|
||||
#if PICO_SCANVIDEO_48MHz
|
||||
set_sys_clock_khz(96000, true);
|
||||
#endif
|
||||
// set_sys_clock_48();
|
||||
#endif
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ void __time_critical_func(render_scanline)(struct scanvideo_scanline_buffer *des
|
|||
}
|
||||
|
||||
int main(void) {
|
||||
set_sys_clock_khz(192000, true);
|
||||
set_sys_clock_khz(200000, true);
|
||||
setup_default_uart();
|
||||
|
||||
#ifdef PICO_SMPS_MODE_PIN
|
||||
|
|
|
@ -6,4 +6,4 @@ rm -f *.bin pack.uf2
|
|||
./packtiles -sdf bgar5515 Stone_Mountain_by_Brad_Huchteman.png stone_mountain.bin
|
||||
./packtiles -sdf bgar5515 Voss_by_fortuneblues.png voss.bin
|
||||
cat *.bin > pack.bin
|
||||
uf2conv -f pico -b 0x1003c000 pack.bin -o pack.uf2
|
||||
uf2conv -f pico -b 0x1003c000 pack.bin -o pack.uf2
|
|
@ -572,7 +572,9 @@ void go_core1(void (*execute)()) {
|
|||
}
|
||||
|
||||
int main(void) {
|
||||
#if PICO_SCANVIDEO_48MHz
|
||||
set_sys_clock_48mhz();
|
||||
#endif
|
||||
setup_default_uart();
|
||||
|
||||
#if PICO_NO_HARDWARE
|
||||
|
|
|
@ -239,19 +239,24 @@ void __time_critical_func(frame_update_logic)() {
|
|||
}
|
||||
|
||||
int main(void) {
|
||||
uint base_freq;
|
||||
#if PICO_SCANVIDEO_48MHZ
|
||||
base_freq = 48000;
|
||||
#else
|
||||
base_freq = 50000;
|
||||
#endif
|
||||
#if PICO_ON_DEVICE
|
||||
#ifdef TURBO_BOOST
|
||||
hw_set_bits(&mm_vreg_and_chip_reset->vreg, VREG_AND_CHIP_RESET_VREG_VSEL_BITS);
|
||||
sleep_ms(10);
|
||||
set_sys_clock_khz(48000*6, true);
|
||||
set_sys_clock_khz(base_freq*6, true);
|
||||
#else
|
||||
//set_sys_clock(1536*MHZ, 4, 2);
|
||||
set_sys_clock_khz(48000 * 4, true);
|
||||
set_sys_clock_khz(base_freq * 3, true);
|
||||
#endif
|
||||
#endif
|
||||
// Re init uart now that clk_peri has changed
|
||||
setup_default_uart();
|
||||
gpio_debug_pins_init();
|
||||
// gpio_debug_pins_init();
|
||||
|
||||
return vga_main();
|
||||
}
|
||||
|
|
|
@ -665,7 +665,9 @@ void go_core1(void (*execute)()) {
|
|||
}
|
||||
|
||||
int main(void) {
|
||||
#if PICO_SCANVIDEO_48MHz
|
||||
set_sys_clock_48mhz();
|
||||
#endif
|
||||
setup_default_uart();
|
||||
|
||||
#if PICO_NO_HARDWARE
|
||||
|
|
|
@ -104,7 +104,9 @@ void render_scanline(struct scanvideo_scanline_buffer *dest, int core) {
|
|||
|
||||
|
||||
int main(void) {
|
||||
#if PICO_SCANVIDEO_48MHz
|
||||
set_sys_clock_48mhz();
|
||||
#endif
|
||||
// Re init uart now that clk_peri has changed
|
||||
setup_default_uart();
|
||||
|
||||
|
|
|
@ -176,6 +176,10 @@ int main(void) {
|
|||
sleep_ms(10);
|
||||
set_sys_clock(1536*MHZ, 4, 1);
|
||||
#else
|
||||
#if PICO_SCANVIDEO_48MHz
|
||||
set_sys_clock_48mhz();
|
||||
#endif
|
||||
|
||||
set_sys_clock_pll(1536 * MHZ, 4, 2);
|
||||
#endif
|
||||
// Re init uart now that clk_peri has changed
|
||||
|
|
|
@ -27,7 +27,6 @@ static semaphore_t video_initted;
|
|||
static bool invert;
|
||||
|
||||
int main(void) {
|
||||
set_sys_clock_48mhz();
|
||||
stdio_init_all();
|
||||
|
||||
// create a semaphore to be posted when video init is complete
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
#include "pico/sync.h"
|
||||
#include "font.h"
|
||||
|
||||
// set this to 3, 4 or 5 for smallest to biggest font
|
||||
#define FRAGMENT_WORDS 4
|
||||
|
||||
#if PICO_ON_DEVICE
|
||||
|
||||
#include "hardware/structs/bus_ctrl.h"
|
||||
|
@ -168,8 +171,6 @@ uint32_t *font_raw_pixels;
|
|||
#else
|
||||
uint32_t font_raw_pixels[16384];
|
||||
#endif
|
||||
#define FRAGMENT_WORDS 4
|
||||
//#define FRAGMENT_WORDS 5
|
||||
#define FONT_WIDTH_WORDS FRAGMENT_WORDS
|
||||
#if FRAGMENT_WORDS == 5
|
||||
const lv_font_t *font = &ubuntu_mono10;
|
||||
|
@ -406,8 +407,8 @@ bool render_scanline_bg(struct scanvideo_scanline_buffer *dest, int core) {
|
|||
// todo for SOME REASON, 80 is the max we can do without starting to really get bus delays (even with priority)... not sure how this could be
|
||||
// todo actually it seems it can work, it just mostly starts incorrectly synced!?
|
||||
#define COUNT MIN(vga_mode.width/(FRAGMENT_WORDS*2)-1, 80)//MAX_SCANLINE_BUFFER_WORDS / 2 - 2)
|
||||
#undef COUNT
|
||||
#define COUNT 79
|
||||
//#undef COUNT
|
||||
//#define COUNT 79
|
||||
// we need to take up 5 words, since we have fixed width
|
||||
#if PICO_SCANVIDEO_PLANE1_FIXED_FRAGMENT_DMA
|
||||
dest->fragment_words = FRAGMENT_WORDS;
|
||||
|
@ -507,7 +508,9 @@ void go_core1(void (*execute)()) {
|
|||
}
|
||||
|
||||
int main(void) {
|
||||
#if PICO_SCANVIDEO_48MHZ
|
||||
set_sys_clock_48mhz();
|
||||
#endif
|
||||
gpio_put(27, 0);
|
||||
|
||||
setup_default_uart();
|
||||
|
|
Ładowanie…
Reference in New Issue