AnsweredAssumed Answered

USB Device and LCD on BF548 problem

Question asked by mratajczyk on Jun 10, 2010
Latest reply on May 23, 2011 by matchaze

Hello everyone,

I'm using the CM-BF548 module on my own  board. I am using BF as a USB peripheral device connected  to a PC.

 

Test application based on usb_loopback module works fine, transfer data rates are high enough.
I have LCD on EPPI0 connted. LCD driver works fine - application is showing some pictures correctly.

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 */
       if(IS_BULK(pEpO->pEndpointDesc->bAttributes))
                  while(*pUSB_TXCSR & (1 << 1)) ;
       else
               *pUSB_TXCSR |= (1 << 3);

 

       }

 

Do you have some advice?

Or, maybe there is some VDK application example with USB OTG and LCD?

 

Marcin

Outcomes