PiCS
Posts: 17
Joined: Sat Jun 20, 2020 3:51 pm

help setting up pixel valve 2 on RPI3

Wed Jun 16, 2021 2:59 pm

I'm trying to set pixel clock for pv2 (hdmi) and I don't know how ?
for DPI (pixel valve 0) is set in Clock Manager CM_DPICTL and CM_DPIDIV (0x7e101068 and 0x7e10106C)
for resolution 800 x 600 @ 60 Hz need pixel clock = 40.0 MHz http://tinyvga.com/vga-timing/800x600@60Hz
my monitor is 1280x1024 and need 800x600 for hdmi output
no need setup fb (hdmi) with mailbox channel https://jsandler18.github.io/extra/fb-channel.html
thanks

Code: Select all

	#define HDMI_WIDTH					800
	#define HDMI_HEIGHT					600

	#define HDMI_HFP					40
	#define HDMI_HBP					88
	#define HDMI_HSYNC					128

	#define HDMI_VFP					1
	#define HDMI_VBP					23
	#define HDMI_VSYNC					4

	PV2_VC = 0x00000003;
	PV2_VSYNCD_EVEN = 0x00000000;
	PV2_HORZA = ((HDMI_HBP << 16) | HDMI_HSYNC);
	PV2_HORZB = ((HDMI_HFP << 16) | HDMI_WIDTH);
	PV2_VERTA = ((HDMI_VBP << 16) | HDMI_VSYNC);
	PV2_VERTB = ((HDMI_VFP << 16) | HDMI_HEIGHT);
	PV2_VERTA_EVEN = 0x00000000;
	PV2_VERTB_EVEN = 0x00000000;
	PV2_INTEN =	0x00000000;
	PV2_INTSTAT = 0x00000000;
	PV2_STAT =	0x00000442;
	PV2_HACT_ACT = 600;
	PV2_C = 0x00177005; 

cleverca22
Posts: 3979
Joined: Sat Aug 18, 2012 2:33 pm

Re: help setting up pixel valve 2 on RPI3

Sun Jun 27, 2021 5:56 pm

i have a pixel valve driver over at https://github.com/librerpi/lk-overlay/ ... valve/pv.c

i have used it to successfully drive PV2 for VEC use (ntsc), but i have not tried HDMI yet

i'm expecting issues getting the hdmi pixel clock right and such, so i havent tried it yet, my scope is likely to have trouble at those speeds

i should probably try dumping the current state from under linux, and then restore that state, and see how far i can get with that...

Return to “Bare metal, Assembly language”