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

Parents
  • I had the same problem. I solved changing mount settings by disabling auto-mount of devices.

    UPDATE: It seems that the problem is caused only by certain USB ports. I tried changing port and everything works. So the mount settings are not impacting on this issue. I'll try to investigate.

    I forgot to say that i had also another issue on Ubuntu: when i connect the device to the USB a system daemon (ModemManager) sends some garbage (AT commands) to test if the device was a modem. I killed the daemon (search it with ps -aux | grep ModemManager) and everything is ok.

Reply
  • I had the same problem. I solved changing mount settings by disabling auto-mount of devices.

    UPDATE: It seems that the problem is caused only by certain USB ports. I tried changing port and everything works. So the mount settings are not impacting on this issue. I'll try to investigate.

    I forgot to say that i had also another issue on Ubuntu: when i connect the device to the USB a system daemon (ModemManager) sends some garbage (AT commands) to test if the device was a modem. I killed the daemon (search it with ps -aux | grep ModemManager) and everything is ok.

Children
Related