Run time error while using VDMA

I have implemented a normal image pipeline with demosaicing and DMA. It is working fine. But providing less frame rate than expecting. I also used threading to use IPYwidgets for controlling the camera module. Everything is working as expected but with less frame rate. Even with the cacheable buffer, it can’t get to more than 15 FPS (While it should be 60 FPS).

So I have tried implementing VDMA instead of DMA. It is providing 60 FPS and working fine until a run time error occurs. Sometimes there is no error at all. Sometimes it stuck within few seconds.

Exception in thread Thread-10:
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "<ipython-input-19-1a986e13837c>", line 24, in work
    frame = vdma.readchannel.readframe()
  File "/usr/local/lib/python3.6/dist-packages/pynq/lib/video/dma.py", line 199, in readframe
    loop = asyncio.get_event_loop()
  File "/usr/lib/python3.6/asyncio/events.py", line 694, in get_event_loop
    return get_event_loop_policy().get_event_loop()
  File "/usr/lib/python3.6/asyncio/events.py", line 602, in get_event_loop
    % threading.current_thread().name)
RuntimeError: There is no current event loop in thread 'Thread-10'.

I appreciate any suggestion on this.

1 Like

Even though it is not a great fix, I have used a try exception block to ignore the error. It’s running okay now.