I'm using the CM-BF548 module on my own board. I am using BF as a USB peripheral device connected to a PC.
Next step is to work together with LCD showing pictures and sending this pictures via USB. And here the problem begins.
First problem - connecting device cable to PC sometimes makes picture frozen for some time, and after this picture starts shifted a few lines. My observation shows that hdrc driver stops in WaitMilliSec(100) procedure. This procedure consists of "while" loop waiting for adequate processor cycles.
Second problem - when PC stalls for some reason during retrieving data - hdrc driver hangs in TransmitDataBuffer procedure waiting on empty FIFO
/* check if FIFO is empty or not */
if(*pUSB_TXCSR & (1 << 1))
/* only for the bulk endpoints we will wait */
while(*pUSB_TXCSR & (1 << 1)) ;
*pUSB_TXCSR |= (1 << 3);
Do you have some advice?
Or, maybe there is some VDK application example with USB OTG and LCD?