24 Apr 2012 20:47
rtcan I/O hang bug with /proc/rtcan/rtcan0/registers
Andrew Tannenbaum <trb <at> interactive-motion.com>
2012-04-24 18:47:24 GMT
2012-04-24 18:47:24 GMT
I'm running Linux 2.6.38.8 Xenomai 2.6.0 Atom N270 CPU I'm talking to CAN with a PEAK PCI SJA1000 CAN adapter. I have a control loop running at 200 Hz, and I use it to drive a motor and read an encoder using rtcan. My code is based on the rtcansend/rtcanrecv examples. I found a bug where my control loop was hanging, and I've isolated the problem so that it may be reproduced with Xenomai supplied tools, without using my own code. The problem is: When I have a loop that is sending CAN packets, if I read /proc/rtcan/rtcan0/registers at the same time, it causes the loop to hang. The hang is in rt_dev_sendto. To reproduce: Configure the CAN controller $ rtcanconfig rtcan0 --baudrate=1000000 start Send packets, in this case, SYNC messages at 1000 Hz with tty output 1 Hz.(Continue reading)
RSS Feed