2009-05-26 07:44:39     a strange problem of SPORT UART Simulation

Document created by Aaronwu Employee on Aug 15, 2013
Version 1Show Document
  • View in full screen mode

2009-05-26 07:44:39     a strange problem of SPORT UART Simulation

maverick gao (CHINA)

Message: 74604   

 

Hi everybody

 

I have encountered a very strange problem when I simulat UART with SPORT.

 

I use the BF531 platform now, but a very old kernel of the 2.4 version. I have found bfin_sport_uart.c in the latest kernel source codes, and made a small modification to adapt to my old 2.4 kernel. I have attached the revised bfin_sport_uart.c.

 

Initially all is well, it can work, TX and RX no problem from B1200 to B115200. However, some RX underflow errors will happened when bf531 is receiving data. the error message from driver describe this: SPORT Error: RX underflow. It really baffles me, as comment in source code: // These should not happen.

 

The ADSP-BF533 Blackfin ® Processor Hardware Reference says:

 

If the program causes the core processor to attempt a read from an empty

RX FIFO, old data is read, the RUVF flag is set in the SPORTx_STAT register,

and the SPORT error interrupt is asserted. The RUVF bit is a sticky bit and

is cleared only when the SPORT is disabled. To determine if the core can

access the RX registers without causing this error, first read the RX FIFO

status (RXNE in the SPORTx Status register). The RUVF status bit is

updated even when the SPORT is disabled.

 

I carefully checked the source code. It should be confirmed that RXNE in the SPORTx Status register is set before every reading the RX FIFO. But why the RX underflow error happened ?

 

I also do a test: I recorded the previous byte and the following byte of the error interruption. The result is that the previous byte is ok and the following byte is wrong.

 

Is it becauseof the old kernel of 2.4 version? I think it is unlikely.

 

I have tried to find some information on internet, but surprisingly I did not find anything. it is only I encountered this problem?

 

Who can give me a help.

 

 

 

Regards,

 

Maverick.

 

 

 

bfin_sport_uart.c

TranslateQuoteReplyEditDelete

 

 

2009-05-26 07:54:47     Re: a strange problem of SPORT UART Simulation

Robin Getz (UNITED STATES)

Message: 74607   

 

Maverick:

 

> but a very old kernel of the 2.4 version.

 

Then I stopped reading -- you need to upgrade. 2.4 is not maintained, and is not supported.

 

-Robin

QuoteReplyEditDelete

 

 

2009-05-26 22:50:43     Re: a strange problem of SPORT UART Simulation

Sonic Zhang (CHINA)

Message: 74627   

 

You may refer to bug   blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=5145

 

No fixing has been found yet.

QuoteReplyEditDelete

 

 

2009-05-30 21:48:53     Re: a strange problem of SPORT UART Simulation

maverick gao (CHINA)

Message: 74826   

 

I made a mistake that my linux kernel is not 2.4. 

 

It is 2.6.16.11-ADI-2006R1-hhbf and gcc is 3.4.5

TranslateQuoteReplyEditDelete

 

 

2009-05-31 07:41:22     Re: a strange problem of SPORT UART Simulation

Robin Getz (UNITED STATES)

Message: 74876   

 

Maverick:

 

HHCN made custom modifications to the kernel - and did not send them to us (they don't have to). - but that means that you need to go to them for help -- not us.

 

-Robin

Attachments

Outcomes