I have written some programs after which the results could be displayed through HDMI and DisplayPort port. Everything is working fine, but if HDMI cable is not connected, it seems the program stuck until a cable is attached to the port. It’s even not showing a timeout error like PYNQ-Z2 board. How to check the cable is connected or not, without been stuck in code. The python code for the HDMI port initiation as follows:
from pynq.overlays.base import BaseOverlay
base = BaseOverlay(“base.bit”)
Mode = VideoMode(width,height,24)
hdmi_out = base.video.hdmi_out
hdmi_out.configure(Mode,PIXEL_BGR)
hdmi_out.start()
It’s an oversight in our APIs unfortunately. The culprits are the the loop here - you can add a timeout condition as a workaround and I’ll add it to the list of things to address in the next version.
There isn’t a nice way of checking if a monitor is connected unfortunately. We need some rework to the interrupt subsystem to make to add it and that’s going to be while.
Update:
I have modified the code to show HDMI output is not connected. I set a timeout clause around line 167 in the file you have suggested me (while not _hdmi_lib.HdmiTx_connected(self.handle)) instead of 184. Now it is working fine. Thanks