Wireless TV Shield Interupts the UART(3) Receiving Data

Today, when I have tried the function of uart receiving data, I found that I can receive 00 01 … 09 in sequence on openmv without using tv.display() function. However, the data gets bad when I use uart.read() followed by tv.dispaly() function. The problem has been solved if I separate this 2 function into different part of the while(True) .
But what behind this phenomenon is what I’m figuring out. Hope to solve the problem.



Now I find the way of separating the two funcs can only alleviating problem, but can not fix it. Only get off the tv.display() can make the data receiving perfect.

This is weird. Um, whats the data rate the data is received at? The tv.diplay() method uses SPI and disables interrupts for a while while sending data. Is the UART running very fast?

Here’s the display method: https://github.com/openmv/openmv/blob/master/src/omv/py/py_tv.c#L540

You aren’t using pins it uses right?

Thank you very much! Your reply exactly explains the problem that we meet. The baud rate we use is 115200 which may be a little fast! Thanks again! :smiley:

Hmm, yeah, it probably takes longer than the serial buffer has time to buffer data for before needing to be serviced by the CPU.