cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC Creator & Designer Software

ezbe_290006
New Contributor II

hi,

i found  a problem  using the rx hw fifo buffer,

if i read a byte from the fifo and in that exact time anew byte is recived the data i read i corrupted.

is there any way to read the fifo without that problem?

thanks.

0 Likes
5 Replies
MotooTanaka
Esteemed Contributor

Hi,

Although I'm not sure if the following sample of mine could provide you some hints,

at least I've been using it for a while now.

Note: Please try the latest version in the discussion (tty_utils_test_5LP_200504)

https://community.cypress.com/t5/Code-Examples/tty-utils-a-utility-sample-for-CLI-type-program/m-p/7...

moto

 

0 Likes
Len_CONSULTRON
Honored Contributor II

ezbe,

Can you provide your project to this thread?

I wonder if your DMA TD is reading the serial buffer memory instead of the FIFO.   The serial buffer memory is the immediate capture value.  The FIFO is the secondarily stored value of the serial buffer once the Rx data is fully received.

In the case of the UART you should be reading from UART_RXDATA_REG.

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
ezbe_290006
New Contributor II

i dont use the dma.

i check how many bytes are in the fifo in my main isr, and then reads that amount of bytes.

i dont use the uart interrupt , but my own isr.

i will upload the project later.

 

0 Likes
ezbe_290006
New Contributor II

i have attached a full explanation of the problem,

thanks for your help.

0 Likes
Len_CONSULTRON
Honored Contributor II

exbe,

I downloaded your project.   I'll take a look at it to see if I can reproduce your results.  It might take a few days.  I have an uber-critical project that needs to be completed.

Len
"Engineering is an Art. The Art of Compromise."
0 Likes