This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

PCA10040 UART problem

Hi,

I'm using a PCA10040 board with the UART example provided with the v12 SDK, and the data seems to get corrupted somewhere along the way between my Ubuntu machine and the nrf52.

When I do:

 pr@pr:~/nRF5/SDK_12/examples/peripheral/uart/pca10040/blank/armgcc$ for i in {1..64}; do echo -n "1" >>/tmp/data; done; cat /tmp/data > /dev/ttyACM0

I get what I expect:

pr@pr:~/nRF5/SDK_12/examples/peripheral/uart/pca10040/blank/armgcc$ cat /dev/ttyACM0| hexdump -C
00000000  31 31 31 31 31 31 31 31  31 31 31 31 31 31 31 31  |1111111111111111|
*

But when I do:

pr@pr:~/nRF5/SDK_12/examples/peripheral/uart/pca10040/blank/armgcc$ for i in {1..65}; do echo -n "1" >>/tmp/data; done; cat /tmp/data > /dev/ttyACM0

I start to get strange things:

pr@pr:~/nRF5/SDK_12/examples/peripheral/uart/pca10040/blank/armgcc$ cat /dev/ttyACM0| hexdump -C
00000000  55 31 31 31 31 31 31 31  31 31 31 31 31 31 31 31  |U111111111111111|
00000010  31 31 31 31 31 31 31 31  31 31 31 31 31 31 31 31  |1111111111111111|
*

and

pr@pr:~/nRF5/SDK_12/examples/peripheral/uart/pca10040/blank/armgcc$ rm /tmp/data; for i in {1..80}; do echo -n "1" >>/tmp/data; done; cat /tmp/data > /dev/ttyACM0

even gives me:

pr@pr:~/nRF5/SDK_12/examples/peripheral/uart/pca10040/blank/armgcc$ cat /dev/ttyACM0| hexdump -C
00000000  55 53 42 53 fa 01 00 00  00 00 00 00 00 00 00 00  |USBS............|
00000010  31 31 31 31 31 31 31 31  31 31 31 31 31 31 31 31  |1111111111111111|
*
00000040  55 53 42 53 fa 01 00 00  00 00 00 00 00 00 00 00  |USBS............|

Any ideas what I'm doing wrong ?

Thanks.

Patrick

Related