UART bitshift not behaving

New to XMOS and XCore? Get started here.
User avatar
msar
Member++
Posts: 19
Joined: Wed Sep 08, 2010 11:04 am

UART bitshift not behaving

Postby msar » Wed Sep 15, 2010 5:16 pm

I noticed some odd behavior testing leon_heller's simple UART code. When using the version that takes 10 bytes, and then returns them, it seems like every second byte gets bitshifted one too many places. What might be going on here?

This is example I/O from the terminal emulator I'm using:

Code: Select all

Data sent: 00000001 
Data sent: 00000001 
Data sent: 00000001 
Data sent: 00000001 
Data sent: 00000001 
Data sent: 00000001 
Data sent: 00000001 
Data sent: 00000001 
Data sent: 00000001 
Data sent: 00000001 
Data received: 00000001 00000001 10000000 10000000 01000000 01000000 00100000 00100000 00010000 11111000
The last byte makes especially little sense to me - any clues as to why this might happen?
User avatar
leon_heller
XCore Expert
Posts: 546
Joined: Thu Dec 10, 2009 10:41 pm
Location: St. Leonards-on-Sea, E. Sussex, UK.

Postby leon_heller » Wed Sep 15, 2010 7:28 pm

I just tried it with the latest 10.4.2 tools, and there does seem to be a problem with it, now. Whatever I type, it returns the same value, changing each time I run it!

I'll look into it.

Who is online

Users browsing this forum: No registered users and 3 guests