Hi. I'm working on a library for a board in development (I have a prototype) which is an RP2350 with DVI sockets, USB hub etc, Audio chip, PSRAM, though the code should run on most RP2350 implementations (e.g. it uses standard pins).
This is MIT licensed so anyone can use it, not proprietary.
So working from the HSTX demo I've got a 640 pixel resolution working with 256 colours (RRRGGGBB), 16 colours (RGGB), 4 greyscale and monochrome, without using any processor time (other than the interrupt code).
What I've been trying to figure out is how to halve the resolution so I can do 320 pixels across, without using any core time (I could make it work by manually expanding 320->640 and rendering that, but I'm loathe to give up the processor time).
I tried halving the HSTX speed but can't get it to work. (Slightly weirdly this jams up the debugger-loader as well for some reason, I have to put it into boot mode to upload it after changing it), the idea being the same pixel data is output at half the speed.
Unfortunately there isn't a lot of working HSTX code out there and a fair chunk of it seems to work like PicoDVI which was great but of course consumes a core to work.
Any suggestions or assistance appreciated !
Paul
https://github.com/paulscottrobson/rp23 ... odules/dvi
This is the code to set the hstx speed ; am I doing something wrong ? I don't see why halving the HSTX clock should cause the debugger not to work ?
This is MIT licensed so anyone can use it, not proprietary.
So working from the HSTX demo I've got a 640 pixel resolution working with 256 colours (RRRGGGBB), 16 colours (RGGB), 4 greyscale and monochrome, without using any processor time (other than the interrupt code).
What I've been trying to figure out is how to halve the resolution so I can do 320 pixels across, without using any core time (I could make it work by manually expanding 320->640 and rendering that, but I'm loathe to give up the processor time).
I tried halving the HSTX speed but can't get it to work. (Slightly weirdly this jams up the debugger-loader as well for some reason, I have to put it into boot mode to upload it after changing it), the idea being the same pixel data is output at half the speed.
Unfortunately there isn't a lot of working HSTX code out there and a fair chunk of it seems to work like PicoDVI which was great but of course consumes a core to work.
Any suggestions or assistance appreciated !
Paul
https://github.com/paulscottrobson/rp23 ... odules/dvi
This is the code to set the hstx speed ; am I doing something wrong ? I don't see why halving the HSTX clock should cause the debugger not to work ?
Code:
void display_setup_clock(uint32_t dvi_clock_khz) { uint vco_freq, post_div1, post_div2; if (!check_sys_clock_khz(dvi_clock_khz, &vco_freq, &post_div1, &post_div2)) { LOG("System clock of %u kHz cannot be exactly achieved", dvi_clock_khz); } const uint32_t freq = vco_freq / (post_div1 * post_div2); // Set the sys PLL to the requested freq pll_init(pll_sys, PLL_COMMON_REFDIV, vco_freq, post_div1, post_div2); // CLK HSTX = Requested freq clock_configure(clk_hstx, 0, CLOCKS_CLK_HSTX_CTRL_AUXSRC_VALUE_CLKSRC_PLL_SYS, freq, freq);}Statistics: Posted by paulscottrobson — Sun Jun 29, 2025 10:07 am