All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] imx28 rtcan flexcan system freezes
@ 2014-01-22 10:24 Alexandre COFFIGNAL
  2014-01-22 11:23 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 27+ messages in thread
From: Alexandre COFFIGNAL @ 2014-01-22 10:24 UTC (permalink / raw)
  To: xenomai

Hi all,

I use two rtcan flexcan on imx28-evk board.

If both rtcan devices receive a data at the same time, this cause a freeze.
After investigation, i found that if I replace in flexcan_rx_interrupt 
these instructions :
-        *(__be32 *)(cf->data + 0) =
-            cpu_to_be32(flexcan_read(&mb->data[0]));
-        *(__be32 *)(cf->data + 4) =
-            cpu_to_be32(flexcan_read(&mb->data[1]));

by these

+        data0 = flexcan_read(&mb->data[0]);
+        data1 = flexcan_read(&mb->data[1]);
+
+        cf->data[3]=((data0 >> 0)  & 0xFF) ;
+        cf->data[2]=((data0 >> 8)  & 0xFF) ;
+        cf->data[1]=((data0 >> 16)  & 0xFF) ;
+        cf->data[0]=((data0 >> 24)  & 0xFF) ;
+        cf->data[7]=((data1 >> 0)  & 0xFF) ;
+        cf->data[6]=((data1 >> 8)  & 0xFF) ;
+        cf->data[5]=((data1 >> 16)  & 0xFF) ;
+        cf->data[4]=((data1 >> 24)  & 0xFF) ;

rtcan flexcan works perfectly.
is  anyone know what is the problem with first instructions ?

My config : xenomai 2.6.3,  linux 3.8.13,



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

end of thread, other threads:[~2014-01-31 13:15 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-22 10:24 [Xenomai] imx28 rtcan flexcan system freezes Alexandre COFFIGNAL
2014-01-22 11:23 ` Gilles Chanteperdrix
2014-01-22 11:36   ` Alexandre COFFIGNAL
2014-01-22 12:00     ` Gilles Chanteperdrix
2014-01-22 13:27       ` Alexandre COFFIGNAL
2014-01-22 13:30         ` Gilles Chanteperdrix
2014-01-22 14:04           ` Alexandre COFFIGNAL
2014-01-22 14:12             ` Gilles Chanteperdrix
2014-01-23 10:04               ` Gilles Chanteperdrix
2014-01-23 11:36                 ` Wolfgang Grandegger
2014-01-23 12:05                   ` Gilles Chanteperdrix
2014-01-23 12:21                     ` Wolfgang Grandegger
2014-01-23 12:23                       ` Gilles Chanteperdrix
2014-01-23 13:07                     ` Gilles Chanteperdrix
2014-01-23 12:54                   ` Alexandre COFFIGNAL
2014-01-23 13:10                     ` Alexandre COFFIGNAL
2014-01-26 19:26               ` Wolfgang Grandegger
2014-01-26 19:29                 ` Gilles Chanteperdrix
2014-01-26 20:16                   ` Wolfgang Grandegger
2014-01-26 20:56                     ` Gilles Chanteperdrix
2014-01-27  7:56                       ` Wolfgang Grandegger
2014-01-28 22:06                         ` Gilles Chanteperdrix
2014-01-29  7:16                           ` Wolfgang Grandegger
2014-01-29 15:50                             ` Alexandre COFFIGNAL
2014-01-29 17:58                               ` Gilles Chanteperdrix
2014-01-31 13:15                                 ` Alexandre COFFIGNAL
2014-01-23 19:48             ` Gilles Chanteperdrix

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.