2011/4/27 Willy Lambert <[email protected]>
>
>
> 2011/4/27 Willy Lambert <[email protected]>
>
>> Hi all,
>>
>> some time ago I had hard job turning my CPU+Can PC104 stack into a working
>> state. Main problem was that I was beginning from nothing (doubts on BIOS,
>> OS, hardware, wires, ...). For some day, I am trying to reinstall all this
>> stuff on another brand new stack, BUT, I have a proper working hardware to
>> isolate problems !
>>
>> I made documents last time to remind me all needed actions but it seems
>> that I forgot something and I don't know where to look at and scratching my
>> head :p
>>
>> Here is the symptoms :
>>
>> I have :
>> _ one set of can-wires, with resistors and a working second node (a CAN
>> controller motor board)
>> _ one PC104 CAN board with configured jumpers.
>> _ 2 CPU with "should be identical BIOS settings" (checked by hand for some
>> interesting sections), one is the old working one, the second is a brand new
>> installation from 0
>>
>> If I connect all this and the old CPU board everything working (the motor
>> runs). If I change to the CPU board nothing works and the interrupts don't
>> increase in /proc/interrupts. Last time this happened, it was about BIOS
>> settings. But I am pretty sure it is not coming from BIOS (I am going to
>> recheck).
>>
>
> I confirm that BIOS settings are exactly equal (only the temperature and
> voltage values differs)
>
>
>>
>>
>> *May this non increasing interrupts came from something else ? OS (linux
>> 2.6.35.7) config ?*
>>
>> My* loading script* is this :
>> modprobe sja1000_isa irq=11,11 mem=0xD0000,0xD0200 ocr=0x5e,0x5e cdr=0,0
>> ip link set can0 type can bitrate 250000 restart-ms 1000
>> ip link set can1 type can bitrate 250000 restart-ms 1000
>> ifconfig can0 up
>> ifconfig can1 up
>>
>>
>>
>> Here is an extract of my *dmesg :*
>> [ 0.780221] vcan: Virtual CAN interface driver
>> ....
>> [ 0.799991] can: controller area network core (rev 20090105 abi 8)
>> ...
>> [ 0.800051] can: raw protocol (rev 20090105)
>> ....
>> [ 0.800055] can: broadcast manager protocol (rev 20090105 t)
>> ....
>> [ 9.117593] sja1000_isa sja1000_isa.0: sja1000_isa device registered
>> (reg_base=0xc00d0000, irq=11)
>> [ 9.117751] sja1000_isa sja1000_isa.1: sja1000_isa device registered
>> (reg_base=0xc00d0200, irq=11)
>> [ 9.117931] Legacy sja1000_isa driver for max. 8 devices registered
>> [ 9.128343] sja1000_isa sja1000_isa.0: setting BTR0=0x01 BTR1=0x1c
>> [ 9.129964] sja1000_isa sja1000_isa.1: setting BTR0=0x01 BTR1=0x1c
>>
>> *lsmod says :*
>> Module Size Used by
>> sja1000_isa 2439 -
>> (because items are not compiled as modules)
>>
>>
>> root@beta:~# *cat /proc/interrupts*
>> CPU0
>> 0: 3013125 IO-APIC-edge timer
>> 1: 4 IO-APIC-edge i8042
>> 8: 81 IO-APIC-edge rtc0
>> 9: 0 IO-APIC-fasteoi acpi
>> *11: 0 IO-APIC-edge can0, can1*
>> 12: 7 IO-APIC-edge i8042
>> 14: 0 IO-APIC-edge ata_piix
>> 15: 2327 IO-APIC-edge ata_piix
>> 19: 0 IO-APIC-fasteoi uhci_hcd:usb3
>> 23: 0 IO-APIC-fasteoi ehci_hcd:usb1, uhci_hcd:usb2
>> 40: 2859 PCI-MSI-edge eth0
>> NMI: 0 Non-maskable interrupts
>> LOC: 4496 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: 11 Machine check polls
>> ERR: 0
>> MIS: 0
>>
>>
>> root@beta:~# *cat /proc/iomem*
>> 00000000-00000fff : reserved
>> 00001000-0009fbff : System RAM
>> 0009fc00-0009ffff : reserved
>> 000a0000-000bffff : PCI Bus 0000:00
>> 000a0000-000bffff : Video RAM area
>> 000c0000-000c7fff : Video ROM
>> 000d0000-000dffff : PCI Bus 0000:00
>> *000d0000-000d001f : sja1000_isa
>> 000d0200-000d021f : sja1000_isa*
>> 000e0000-000fffff : reserved
>> 000f0000-000fffff : System ROM
>> .......
>>
>>
>> The BIOS has the Boot up from lan desactivated (it takes the ISA memory),
>> and the PnP section with a reserved Irq 11
>>
>>
> This may also help to debug :
root@beta:~# ip -d -s link show can0
3: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN qlen
10
link/can
can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 1000
bitrate 250000 sample-point 0.875
tq 250 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
sja1000: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 0 0 0
RX: bytes packets errors dropped overrun mcast
0 0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0
root@beta:~# ip -d -s link show can1
4: can1: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN qlen
10
link/can
can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 1000
bitrate 250000 sample-point 0.875
tq 250 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
sja1000: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 0 0 0
RX: bytes packets errors dropped overrun mcast
0 0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0
root@beta:~#
_______________________________________________
Socketcan-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-users