2011/1/14 Wolfgang Grandegger <[email protected]>

> On 01/14/2011 12:57 AM, Willy Lambert wrote:
> > 2011/1/13 Willy Lambert <[email protected]>
> ...
> > I am stuck with the test case setup, candump shows error messages when I
> try
> > a cansend. I already have tricks with extended or standard data frame
> > formats with Ixxat drivers. My motors seems to only accept standard
> frames.
> > Is there a way to configure this ?
> >
> > I booted my target with Ixxat driver and run my test cases to validate
> > everything is in order. (BIOS options, jumpers, IRQ, wiring). I only use
> one
> > controller on IRQ11 (as it is said as "reserved" in my CPU board IRQ
> > mapping)
> > I may run my motor and receive SDO from him, everything seems to be OK.
>
> The hardware seem to work. That's a good starting point.
>
> > Without changing anything except my init script which load can drivers
> (in
> > order to load socket can drivers instead of Ixxat ones), I rebooted my
> CPU.
> >
> > Here is the load script :
> >
> >> modprobe sja1000_isa irq=11 mem=0xD0000
> >> ip link set can0 type can bitrate 250000 restart-ms 1000
> >> ifconfig can0 up
> >>
> >
> > Here is dmesg answer (which seems correc) :
> >
> >> [    3.928467] sja1000_isa sja1000_isa.0: sja1000_isa device registered
> >> (reg_base=0xc00d0000, irq=11)
> >> [    3.928646] Legacy sja1000_isa driver for max. 8 devices registered
> >> [    3.938877] sja1000_isa sja1000_isa.0: setting BTR0=0x01 BTR1=0x1c
> >>
> >
> > Here is ifconfig result :
> >
> >> can0      Link encap:UNSPEC  HWaddr
> >> 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
> >>           UP RUNNING NOARP  MTU:16  Metric:1
> >>           RX packets:2 errors:0 dropped:0 overruns:0 frame:0
> >>           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
> >>           collisions:0 lg file transmission:10
> >>           RX bytes:16 (16.0 B)  TX bytes:0 (0.0 B)
> >>           Interruption:11
> >>
> >
> > Here is /proc/iomem
> >
> >> 00000000-00000fff : reserved
> >> 00001000-0009fbff : System RAM
> >> 0009fc00-0009ffff : reserved
> >> 000a0000-000bffff : Video RAM area
> >> 000c0000-000c7fff : Video ROM
> >> 000d0000-000d001f : sja1000_isa
> >> ...
> >>
> >
> > Here is /proc/interrupts
> >
> >>            CPU0
> >>   0:        215   IO-APIC-edge      timer
> >>   1:          8   IO-APIC-edge      i8042
> >>   2:          0    XT-PIC-XT        cascade
> >>   8:         97   IO-APIC-edge      rtc0
> >>  11:          1   IO-APIC-edge      can0
> >>  12:          7   IO-APIC-edge      i8042
> >>  14:          0   IO-APIC-edge      ata_piix
> >>  15:       1017   IO-APIC-edge      ata_piix
> >>  19:          0   IO-APIC-fasteoi   uhci_hcd:usb3
> >>  23:         14   IO-APIC-fasteoi   ehci_hcd:usb1, uhci_hcd:usb2
> >>  40:        411   PCI-MSI-edge      eth0
> >> NMI:          0   Non-maskable interrupts
> >> LOC:     293000   Local timer interrupts
> >> SPU:          0   Spurious interrupts
> >> PMI:          0   Performance monitoring interrupts
> >> PND:          0   Performance pending work
> >> TRM:          0   Thermal event interrupts
> >> THR:          0   Threshold APIC interrupts
> >> MCE:          0   Machine check exceptions
> >> MCP:          1   Machine check polls
> >> ERR:          0
> >> MIS:          0
> >>
> >
> > I write this command to wake up everybody :
> >
> >> ./cansend can0 000#0100
> >>
> >
> > And at the same time, in another terminal, I run candump with theses
> results
> > :
> >
> >>  ./candump any,0:0,#FFFFFFFF
> >>   can0  20000040  [8] 00 00 00 00 00 00 00 00   ERRORFRAME
> >>   can0  20000100  [8] 00 00 00 00 00 00 00 00   ERRORFRAME
> >>   can0  20000004  [8] 00 04 00 00 00 00 00 71   ERRORFRAME
> >>   can0  20000004  [8] 00 10 00 00 00 00 00 81   ERRORFRAME
>
> The controller goes bus-off.


May I ask you how you decode the candump ERRORFRAME ? does the
20000040/20000100/20000004 makes sens ? What the date behind ?


> There are still some electrical problems.
>

Ok, BUT, I works before rebooting !



> Next try to specific proper values for cdr and ocr:
>
>   modprobe sja1000_isa irq=11 mem=0xD0000 ocr=0x5e,0x5e
>
> and then
>
>   modprobe sja1000_isa irq=11 mem=0xD0000 ocr=0x5e,0x5e cdr=0,0
>
> I'll do it this afternoon



> As you know, there might still be the magic controller reset missing.
>

I forgot this, do you whant me to try a patch against this ?


>
> Good luck.
>
_______________________________________________
Socketcan-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-users

Reply via email to