-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Metro RP2350 DVI output defaults to 72Hz refresh (capture cards like 60Hz) #10242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I bet we can scale the HSTX clock down to get 60hz. 720x400 may work better for you because that mode is ideally 70hz. |
I tried When I forum searched previously to see what people like for taking 720x400 captures from old DOS games (the primary context where that resolution shows up), it sounded like the general opinion was that it was difficult to do. I saw mention of using VGA or component-video to HDMI converters. People also suggested pro video gear like the Aja U-Tap or Extron video scalers. Anyhow, this is the test code that I used for 720x400 (works with TV, does not work with capture card):
This is the test code that I used for 640x480 (works well on TV and capture card in the "60Hz" refresh rate range as reported by the TV):
|
Figured out how to actually read and decode the capture card's EDID info using This is the relevant part of the output for the video modes supported by the AverMedia GC551G2:
|
hmm... that previous video mode list may have been inaccurate. I managed to accidentally plug the USB cable in only part way. So maybe the capture card was running in USB 2.0 mode instead of 3.x? This is the result I got from
|
The 27mhz pixel clock ones could be interesting! I don't think we'll want to go faster than that. I'd like to try extending the vblank period to fix this instead of changing the clock rate. Theoretically we can extend vblank to refresh the frame at the intended rate. |
It would be great if the vblank extension thing you're suggesting could avoid slowing down the main clock. For 27MHz modes, my impression is that many displays and capture cards probably support 480p. I wonder if it would be possible to use the HSTX config to automatically put a frame of black, or perhaps a configurable color, around smaller frame buffers, so long as they fit within 720x480. [edit: hmm... upon further reading, maybe 480p (4:3) is actually just a fancy name for 640x480, 480p (3:2) is 720x480, and 16:9 480p isn't actually a thing? these video modes are so confusing. In any case, it would be great if it was possible to find a mode that generally worked across common capture cards and displays, including the cheaper ones.] |
This is what 720x400 @ 70hz has been for me. It is close to 16:9. Works on my TV at the office and at home. My XR1 Lite ($60) can also capture it just fine. |
Moving to long term because the non-standard speed works with most things. |
FWIW, I got tripped up by this again on 10.0.0-alpha.4. I'm trying to do a Playground guide that uses USB Host and DVI out. I'd like to use my HDMI capture card to take clean images for the guide. At the moment, the best I'll be able to do is photographing a fuzzy upscale off the TV. After a fresh firmware install, the Fruit Jam boots to 640x480@72Hz (according to my TV). Sync with the TV is marginal (initially refused to sync, then did okay after a reset). Sync with my capture card doesn't work. If I try messing with I guess my only option at this point is to try buying new capture cards until I find one that works at 640x480@72Hz? I'd rather not do that if I can avoid it. I'd feel differently if the Fruit Jam was running at a more common refresh rate for 640x480. From my perspective, this seems like a thing that could end up causing trouble for a fair number of other folks once the board is readily available and people try hooking up to a wider variety of HDMI devices (capture cards in particular). Maybe I'm wrong about that though. |
Is the garbled video that I'm experiencing related to this issue? I'm finally trying HSTX DVI output on Metro RP2350 and the demo code in the Learn Guide is scrambled like the timing is off on my little test HDMI display (see below). This happens for both 320x240x16 and 640x480x8 on both 9.2.8 and 10.0.0-alpha.6. |
I only tested with two devices, but both of those, when they got mad about sync rates, just gave me a black screen with an error message overlay. No clue what it would have looked like on screen if they'd actually tried to draw the signal that they were complaining about not being able to sync to. The clock rate adjustment thing sounds similar though. edit: my ultimate solution to this was to keep an eye on ebay auctions for the EVGA XR1 Lite until I was able to snag one for a reasonable price. |
The RP2350 HSTX-DVI outputs run at double-pumped CPU clock speed, with the 'clock' pin at 1/10th of that per the DVI spec. This means that the 'pixel clock' they're generating is The 'VGA 640x480' 60Hz timings require 25.175Mhz pixel clock, with VESA requiring a minimum of 0.5% clock tolerance but in practice because generating exactly 25.175Mhz with PLLs is such a hard thing versus plain 25Mhz most devices will accept 25Mhz happily. Changing the video timings to a pixel total of 800x625 (exactly 500k pixels per frame, 160 hblank/145 vblank for 640x480) requires a pixel clock of 30Mhz for 60Hz display so things align better if the video capture device will accept that, some will and some won't. Both the 720x400 and 640x480 modes can be run inside the 800x625 geometry as a possible 'alternative video timing' option flag to consider? |
Uh oh!
There was an error while loading. Please reload this page.
CircuitPython version and board name
Code/REPL
Behavior
When I connect the Metro's HSTX port to a DVI adapter and connect the DVI adapter to a TV, the TV shows the CircuitPython console. But, it reports that the video mode is
640x480@72Hz
(not60Hz
).When I try to capture the video output with an AverMedia GC551G2, it says "Not Supported". That makes sense because many capture cards and video scalers appear to generally expect 60Hz refresh for lower resolution video modes (based on my reading of various manuals). My impression is that TVs and monitors that have VGA or component video inputs may be more flexible about accepting a range of refresh rates.
This is what the capture card output looks like when I boot the Metro RP2350 with an empty
code.py
:Description
No response
Additional information
If I change
microcontroller.cpu.frequency
from its default of 150MHz down to 125MHz (because 150/72*60 = 125), then the TV reports a 60Hz refresh rate and the capture card immediately starts working happily, like this:The text was updated successfully, but these errors were encountered: