All of lore.kernel.org
 help / color / mirror / Atom feed
* c_can driver sometimes sends first two bytes filled with zeros
@ 2016-05-12  9:23 Richard Andrysek
  2016-05-16 18:14 ` Thor Thayer
  2016-05-23 18:19 ` Wolfgang Grandegger
  0 siblings, 2 replies; 14+ messages in thread
From: Richard Andrysek @ 2016-05-12  9:23 UTC (permalink / raw)
  To: linux-can

We can reproduce an issue with the canutils. We send messages in the loop with non-zero bytes and from time to time we get first two bytes of the message with zero values. The test script looks so:

#!/bin/sh

echo "Press [CTRL+C] to stop.."
while true
do
               cansend can1 --loop=15 -i 933 0xde 0xde 0xde 0xde 0xde 0xde
done

With CAN analyzer we see normally the right message, but in cycles ~1min we see first two bytes are zero.

If we add some delays between messages, like this:

do
               cansend can1 --loop=1 -i 933 0xde 0xde 0xde 0xde 0xde 0xde
               usleep 5
	cansend can1 --loop=1 -i 933 0xde 0xde 0xde 0xde 0xde 0xde
               usleep 5
	cansend can1 --loop=1 -i 933 0xde 0xde 0xde 0xde 0xde 0xde
               usleep 5
	cansend can1 --loop=1 -i 933 0xde 0xde 0xde 0xde 0xde 0xde
               usleep 5
	cansend can1 --loop=1 -i 933 0xde 0xde 0xde 0xde 0xde 0xde
               usleep 5
	cansend can1 --loop=1 -i 933 0xde 0xde 0xde 0xde 0xde 0xde
               usleep 5
	cansend can1 --loop=1 -i 933 0xde 0xde 0xde 0xde 0xde 0xde
               usleep 5
	cansend can1 --loop=1 -i 933 0xde 0xde 0xde 0xde 0xde 0xde
               usleep 5
	cansend can1 --loop=1 -i 933 0xde 0xde 0xde 0xde 0xde 0xde
               usleep 5
	cansend can1 --loop=1 -i 933 0xde 0xde 0xde 0xde 0xde 0xde
               usleep 5
	cansend can1 --loop=1 -i 933 0xde 0xde 0xde 0xde 0xde 0xde
               usleep 5

done

It works fine.

We use Altera Cyclone V, where the  c_can driver is used. It runs with Linux kernel 3.16, but I've checked 4.5 version of a driver and it is a same one.

Have somebody idea how to find a reason for that? 

Richard


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2016-06-10 13:36 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-12  9:23 c_can driver sometimes sends first two bytes filled with zeros Richard Andrysek
2016-05-16 18:14 ` Thor Thayer
2016-05-17 17:18   ` AW: " Richard Andrysek
2016-05-18 15:35     ` Thor Thayer
     [not found]       ` <0120733A154AE74CA608A286CE7FFD2621D9CB60@rg-contact.RG.local>
2016-05-19 23:00         ` AW: " Thor Thayer
2016-05-20 12:01           ` AW: " Richard Andrysek
2016-05-23 14:22             ` Thor Thayer
2016-05-23 18:19 ` Wolfgang Grandegger
2016-06-01  9:40   ` AW: " Richard Andrysek
2016-06-01 13:09     ` Wolfgang Grandegger
2016-06-10 10:49       ` Andy Haydon
2016-06-10 12:55         ` Wolfgang Grandegger
2016-06-10 13:12           ` Andy Haydon
2016-06-10 13:36             ` Wolfgang Grandegger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.