baseboard serial receive fifo

조회 수: 2 (최근 30일)
Gorkem
Gorkem 2016년 7월 23일
댓글: Walter Roberson 2016년 7월 29일
Hello,
I'm using baseboard serial fifo out block to receive data @ 1kHz from an external device.
The device sends a unique header byte at the beginning of each message packet.
However, message length isn't fixed. For that reason, I decided to use ordinary fifo read block instead of fifo bin read. So, I wrote my own state machine to sync with messages.
The fifo read block is configured as count + uint16 array.
even though it is working without any problem mostly, sometimes it gives some strange values.
for example,
4 39(header) byte1 byte2 checksumbyte is what I'm expecting.
But fifo read block sometime gives me something like : 4 <some integer above 255> byte1 byte 2 checksumbyte or 4 39 <some integer above 255> byte 2
what does that mean when an element of fifo read is greater than 255? Simple decomposition of that uint16 value into two uint8 values just gives some random numbers.
Any help is appreciated.
  댓글 수: 8
Gorkem
Gorkem 2016년 7월 25일
Is there any reasonable explanation why I have data > 255 in the fifo output even though baseboard serial block is configured as 8 data bits?
Walter Roberson
Walter Roberson 2016년 7월 29일
Because it is not configured as 8 data bits. Your screen snapshot shows you have configured for 16 bit output.

댓글을 달려면 로그인하십시오.

답변 (3개)

Gorkem
Gorkem 2016년 7월 24일
UP! still having the issue !

Gorkem
Gorkem 2016년 7월 24일
I also have an additional question. How does fifo receive interrupt level work? When I set it to half full or full, the problem get worse.
When I set it to 1, no data is received.

Gorkem
Gorkem 2016년 7월 29일
I couldn't resolved the problem. Need help of anyone having the same issue

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by