All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] Try to get recption on driver CAN
@ 2009-04-27 12:53 Marcel Soulot
  2009-04-27 13:29 ` Wolfgang Grandegger
  0 siblings, 1 reply; 6+ messages in thread
From: Marcel Soulot @ 2009-04-27 12:53 UTC (permalink / raw)
  To: Xenomai help

[-- Attachment #1: Type: text/plain, Size: 1413 bytes --]

Hi,

I try to receive data from CAN network. I got a PCI card with a FPGA which
emulates the SJA1000.
So I load the following modules :
insmod ./xeno_can.ko
insmod ./xeno_can_sja1000.ko
insmod ./xeno_can_mem.ko mem=0xe0000800 irq=5 can_clock=80000000 cdr=0x8F

then I configure with :
./rtcanconfig rtcan0 -v --baudrate=125000 start

and launch the receive test application :
./rtcanrecv rtcan0 -v

The task is running but nothing happen in reception.
I could just say that the transmitter was blocked before I load the driver.
After all the upon configuration, I can check that the connection with
transmitter is now enabled and the data are sent.

First, my question is this procedure have any chance to work ? or I missed
something in the configuration ?
I haven't set any filter, so I guess that I will receive all the data
incoming, right ?

thanks for your help,
Marcel


here I joined all the info concerning the driver setting:

INFO:
Device     rtcan0
Controller SJA1000
Board      mem mapped
Clock-Hz   40000000
Baudrate   125000
Bit-time   brp=16 prop_seg=0 phase_seg1=16 phase_seg2=3 sjw=1 sam=0
Ctrl-Mode
State      active
TX-Counter 0
RX-Counter 0
Errors     0
Refcount   0

REGISTERS :
SJA1000 registers
00: 00 00 0d 01 ff 00 0f 2f 00 00 00 00 00 60 00 00
10: 08 a1 80 80 00 00 00 00 00 00 00 08 a2 40 00 8f

FILTERS:
fd __CAN_ID__ _CAN_Mask_ Inv MatchCount
 0 0x00000000 0x00000000  no          0

[-- Attachment #2: Type: text/html, Size: 1581 bytes --]

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

* Re: [Xenomai-help] Try to get recption on driver CAN
  2009-04-27 12:53 [Xenomai-help] Try to get recption on driver CAN Marcel Soulot
@ 2009-04-27 13:29 ` Wolfgang Grandegger
  2009-04-27 13:52   ` Marcel Soulot
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Grandegger @ 2009-04-27 13:29 UTC (permalink / raw)
  To: Marcel Soulot; +Cc: Xenomai help

Marcel Soulot wrote:
> Hi,
> 
> I try to receive data from CAN network. I got a PCI card with a FPGA
> which emulates the SJA1000.
> So I load the following modules :
> insmod ./xeno_can.ko
> insmod ./xeno_can_sja1000.ko
> insmod ./xeno_can_mem.ko mem=0xe0000800 irq=5 can_clock=80000000 cdr=0x8F
> 
> then I configure with :
> ./rtcanconfig rtcan0 -v --baudrate=125000 start
> 
> and launch the receive test application :
> ./rtcanrecv rtcan0 -v
> 
> The task is running but nothing happen in reception.
> I could just say that the transmitter was blocked before I load the
> driver. After all the upon configuration, I can check that the
> connection with transmitter is now enabled and the data are sent.

Do you get interrupts for out-going messages? What does "/proc/xeno/irq"
report?.

> First, my question is this procedure have any chance to work ? or I
> missed something in the configuration ?

I think you need a PCI driver to support your card properly.

Wolfgang.


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

* Re: [Xenomai-help] Try to get recption on driver CAN
  2009-04-27 13:29 ` Wolfgang Grandegger
@ 2009-04-27 13:52   ` Marcel Soulot
  2009-04-27 14:14     ` Wolfgang Grandegger
  0 siblings, 1 reply; 6+ messages in thread
From: Marcel Soulot @ 2009-04-27 13:52 UTC (permalink / raw)
  To: Wolfgang Grandegger; +Cc: Xenomai help

[-- Attachment #1: Type: text/plain, Size: 1602 bytes --]

2009/4/27 Wolfgang Grandegger <wg@domain.hid>

> Marcel Soulot wrote:
> > Hi,
> >
> > I try to receive data from CAN network. I got a PCI card with a FPGA
> > which emulates the SJA1000.
> > So I load the following modules :
> > insmod ./xeno_can.ko
> > insmod ./xeno_can_sja1000.ko
> > insmod ./xeno_can_mem.ko mem=0xe0000800 irq=5 can_clock=80000000 cdr=0x8F
> >
> > then I configure with :
> > ./rtcanconfig rtcan0 -v --baudrate=125000 start
> >
> > and launch the receive test application :
> > ./rtcanrecv rtcan0 -v
> >
> > The task is running but nothing happen in reception.
> > I could just say that the transmitter was blocked before I load the
> > driver. After all the upon configuration, I can check that the
> > connection with transmitter is now enabled and the data are sent.
>
> Do you get interrupts for out-going messages? What does "/proc/xeno/irq"
> report?.
>

I sent the data from another computer so I can check the flow data on my CAN
device (CANcaseXL). when the driver is unloaded I got the error led and when
I loaded and configured the driver the led transmit start to blink and the
error led is off.

>
> > First, my question is this procedure have any chance to work ? or I
> > missed something in the configuration ?
>
> I think you need a PCI driver to support your card properly.
>

I also already manage a GPIO driver for the same card and it works fine. The
driver xeno_can_mem.ko is not designed to access register with memory
address ? What are the risk espacially if I have to manage several
differents driver with the same card?

>
> Wolfgang.
>

thanks,
Marcel.

[-- Attachment #2: Type: text/html, Size: 2718 bytes --]

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

* Re: [Xenomai-help] Try to get recption on driver CAN
  2009-04-27 13:52   ` Marcel Soulot
@ 2009-04-27 14:14     ` Wolfgang Grandegger
  2009-04-27 14:37       ` Marcel Soulot
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Grandegger @ 2009-04-27 14:14 UTC (permalink / raw)
  To: Marcel Soulot; +Cc: Xenomai help

Marcel Soulot wrote:
> 
> 
> 2009/4/27 Wolfgang Grandegger <wg@domain.hid <mailto:wg@domain.hid>>
> 
>     Marcel Soulot wrote:
>     > Hi,
>     >
>     > I try to receive data from CAN network. I got a PCI card with a FPGA
>     > which emulates the SJA1000.
>     > So I load the following modules :
>     > insmod ./xeno_can.ko
>     > insmod ./xeno_can_sja1000.ko
>     > insmod ./xeno_can_mem.ko mem=0xe0000800 irq=5 can_clock=80000000
>     cdr=0x8F
>     >
>     > then I configure with :
>     > ./rtcanconfig rtcan0 -v --baudrate=125000 start
>     >
>     > and launch the receive test application :
>     > ./rtcanrecv rtcan0 -v
>     >
>     > The task is running but nothing happen in reception.
>     > I could just say that the transmitter was blocked before I load the
>     > driver. After all the upon configuration, I can check that the
>     > connection with transmitter is now enabled and the data are sent.
> 
>     Do you get interrupts for out-going messages? What does "/proc/xeno/irq"
>     report?.
> 
> 
> I sent the data from another computer so I can check the flow data on my
> CAN device (CANcaseXL). when the driver is unloaded I got the error led
> and when I loaded and configured the driver the led transmit start to
> blink and the error led is off.

Well, I don't understand what that means. Is RT-Socket-CAN working on
you PCI card. If not, what does not work? RX? TX?

>     > First, my question is this procedure have any chance to work ? or I
>     > missed something in the configuration ?
> 
>     I think you need a PCI driver to support your card properly.
> 
> 
> I also already manage a GPIO driver for the same card and it works fine.

Does it use interrupts?

> The driver xeno_can_mem.ko is not designed to access register with
> memory address ? What are the risk espacially if I have to manage
> several differents driver with the same card?

The accesses from and to the device should not be a problem but
interrupt handling might be.

Wolfgang.


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

* Re: [Xenomai-help] Try to get recption on driver CAN
  2009-04-27 14:14     ` Wolfgang Grandegger
@ 2009-04-27 14:37       ` Marcel Soulot
  2009-04-27 16:10         ` Wolfgang Grandegger
  0 siblings, 1 reply; 6+ messages in thread
From: Marcel Soulot @ 2009-04-27 14:37 UTC (permalink / raw)
  To: Wolfgang Grandegger; +Cc: Xenomai help

[-- Attachment #1: Type: text/plain, Size: 2556 bytes --]

2009/4/27 Wolfgang Grandegger <wg@domain.hid>

> Marcel Soulot wrote:
> >
> >
> > 2009/4/27 Wolfgang Grandegger <wg@domain.hid <mailto:
> wg@domain.hid>>
> >
> >     Marcel Soulot wrote:
> >     > Hi,
> >     >
> >     > I try to receive data from CAN network. I got a PCI card with a
> FPGA
> >     > which emulates the SJA1000.
> >     > So I load the following modules :
> >     > insmod ./xeno_can.ko
> >     > insmod ./xeno_can_sja1000.ko
> >     > insmod ./xeno_can_mem.ko mem=0xe0000800 irq=5 can_clock=80000000
> >     cdr=0x8F
> >     >
> >     > then I configure with :
> >     > ./rtcanconfig rtcan0 -v --baudrate=125000 start
> >     >
> >     > and launch the receive test application :
> >     > ./rtcanrecv rtcan0 -v
> >     >
> >     > The task is running but nothing happen in reception.
> >     > I could just say that the transmitter was blocked before I load the
> >     > driver. After all the upon configuration, I can check that the
> >     > connection with transmitter is now enabled and the data are sent.
> >
> >     Do you get interrupts for out-going messages? What does
> "/proc/xeno/irq"
> >     report?.
> >
> >
> > I sent the data from another computer so I can check the flow data on my
> > CAN device (CANcaseXL). when the driver is unloaded I got the error led
> > and when I loaded and configured the driver the led transmit start to
> > blink and the error led is off.
>
> Well, I don't understand what that means. Is RT-Socket-CAN working on
> you PCI card. If not, what does not work? RX? TX?


yes RT-Socket-CAN works on my PCI card but I don't send any data with it,
just try to receive data.

>
>
> >     > First, my question is this procedure have any chance to work ? or I
> >     > missed something in the configuration ?
> >
> >     I think you need a PCI driver to support your card properly.
> >
> >
> > I also already manage a GPIO driver for the same card and it works fine.
>
> Does it use interrupts?


No, it doesn't use interrupts, why ?  Does the problem can come from the
interrupt management ? I Notice that nothing happen in interrupt task.

>
>
> > The driver xeno_can_mem.ko is not designed to access register with
> > memory address ? What are the risk espacially if I have to manage
> > several differents driver with the same card?
>
> The accesses from and to the device should not be a problem but
> interrupt handling might be.
>

Why the interrupt handling is not able to manage sharing between different
driver (all the driver are running with Xenomai)?

>
> Wolfgang.


Thanks,
Marcel.

[-- Attachment #2: Type: text/html, Size: 4173 bytes --]

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

* Re: [Xenomai-help] Try to get recption on driver CAN
  2009-04-27 14:37       ` Marcel Soulot
@ 2009-04-27 16:10         ` Wolfgang Grandegger
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Grandegger @ 2009-04-27 16:10 UTC (permalink / raw)
  To: Marcel Soulot; +Cc: Xenomai help

Marcel Soulot wrote:
> 
> 
> 2009/4/27 Wolfgang Grandegger <wg@domain.hid <mailto:wg@domain.hid>>
> 
>     Marcel Soulot wrote:
>     >
>     >
>     > 2009/4/27 Wolfgang Grandegger <wg@domain.hid
>     <mailto:wg@domain.hid> <mailto:wg@domain.hid
>     <mailto:wg@domain.hid>>>
>     >
>     >     Marcel Soulot wrote:
>     >     > Hi,
>     >     >
>     >     > I try to receive data from CAN network. I got a PCI card
>     with a FPGA
>     >     > which emulates the SJA1000.
>     >     > So I load the following modules :
>     >     > insmod ./xeno_can.ko
>     >     > insmod ./xeno_can_sja1000.ko
>     >     > insmod ./xeno_can_mem.ko mem=0xe0000800 irq=5 can_clock=80000000
>     >     cdr=0x8F
>     >     >
>     >     > then I configure with :
>     >     > ./rtcanconfig rtcan0 -v --baudrate=125000 start
>     >     >
>     >     > and launch the receive test application :
>     >     > ./rtcanrecv rtcan0 -v
>     >     >
>     >     > The task is running but nothing happen in reception.
>     >     > I could just say that the transmitter was blocked before I
>     load the
>     >     > driver. After all the upon configuration, I can check that the
>     >     > connection with transmitter is now enabled and the data are
>     sent.
>     >
>     >     Do you get interrupts for out-going messages? What does
>     "/proc/xeno/irq"
>     >     report?.
>     >
>     >
>     > I sent the data from another computer so I can check the flow data
>     on my
>     > CAN device (CANcaseXL). when the driver is unloaded I got the
>     error led
>     > and when I loaded and configured the driver the led transmit start to
>     > blink and the error led is off.
> 
>     Well, I don't understand what that means. Is RT-Socket-CAN working on
>     you PCI card. If not, what does not work? RX? TX?
> 
> 
> yes RT-Socket-CAN works on my PCI card but I don't send any data with
> it, just try to receive data.

You say it works but you do not receive an data with rtcanrecev.Hm, try
to send data with rtcansend, monitor the CAN bus and check
/proc/xenoma/irq. What do you get?

>     >     > First, my question is this procedure have any chance to work
>     ? or I
>     >     > missed something in the configuration ?
>     >
>     >     I think you need a PCI driver to support your card properly.
>     >
>     >
>     > I also already manage a GPIO driver for the same card and it works
>     fine.
> 
>     Does it use interrupts?
> 
> 
> No, it doesn't use interrupts, why ?  Does the problem can come from the
> interrupt management ? I Notice that nothing happen in interrupt task.

What I observed in the past is that xeno_can_mem.ko has problems
handling the interrupts properly.

>     > The driver xeno_can_mem.ko is not designed to access register with
>     > memory address ? What are the risk espacially if I have to manage
>     > several differents driver with the same card?
> 
>     The accesses from and to the device should not be a problem but
>     interrupt handling might be.
> 
> 
> Why the interrupt handling is not able to manage sharing between
> different driver (all the driver are running with Xenomai)?

Hm, what hardware is on your PCI card? How are interrupts routed?

Wolfgang.



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

end of thread, other threads:[~2009-04-27 16:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-27 12:53 [Xenomai-help] Try to get recption on driver CAN Marcel Soulot
2009-04-27 13:29 ` Wolfgang Grandegger
2009-04-27 13:52   ` Marcel Soulot
2009-04-27 14:14     ` Wolfgang Grandegger
2009-04-27 14:37       ` Marcel Soulot
2009-04-27 16:10         ` 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.