baseboard serial receive fifo
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
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 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!