본문 바로가기

Useful Tips

DM365 USB Error - musb_h_tx_flush_fifo 124: Could not flush host TX fifo:

USB Driver에서 아래와 같은 error가 계속해서 발생하면서 fifo가 clear되지 않는 경우,

 

musb_h_tx_flush_fifo 124: Could not flush host TX fifo:

 

FLUSHFIFO 만 set해서 write 하지 말고

TXPKTRDY 를 clear 해준다.

 

csr |= MUSB_TXCSR_FLUSHFIFO;

+ /*
+ * Setting both TXPKTRDY and FLUSHFIFO makes controller
+ * to interrupt current FIFO loading, but not flushing
+ * the already loaded ones.
+ */
+ csr &= ~MUSB_TXCSR_TXPKTRDY;