On 02/17/2014 05:49 PM, Wayne Ross wrote:
>> From: Paul [[email protected]]
> 
>> Sent: Friday, February 14, 2014 6:29 PM
>> On Friday 14 February 2014, [email protected] wrote:
>>> I am rather new to Linux development, so please bear with me.
> 
>>> My next step lies in utilizing a CAN PC-104 board (Advantech PCM-3680
>>> is what I have now) to send and receive messages in close time with
>>> serial data received from a 16550A UART.
>>>
>>> I've struggled a bit and cannot successfully get xeno_can_isa to load
>>> with what I think are the correct io and irq settings.  I think I
>>> need io address of 0xda0000 but am told this is "invalid for
>>> parameter 'io'".  The board's documentation uses the old x86
>>> segment:offset notation of 0xDA00:0000, which I think is 0xDA0000.

If the address is 0xda0000, probably

  # modprobe xeno_can_mem mem=0xda0000 irq=12

does work.

> 
>> Have you tried 0xDA00 ?
>>
>> This should allow access to the first port. To make use of the second
>> port, try loading the driver with io=0xda00,0xdc00
>>
>> 0xDA00:0200 is another way of saying 0xDA00+0x0200 = 0xDC00
>>
>> Check the DIP switches and ensure that you have the correct address set.
> 
> When I use "modprobe xeno_can_isa io=0xdb00 irq=12"
> 
> The response is:
> ERROR: could not insert 'xeno_can_isa': No such device
> 
> and dmesg provides:
> ERROR! No SJA1000 device found!
> ERROR -19 while trying to register SJA1000 device!
> 
> I *do* have this board working with a driver provided by the manufacturer, 
> and their configuration file has the following contents that allows me to 
> successfully utilize their board (albeit with notable propagation delays). 
> Thus the "Base" number 0xdb000 and Irq 12 allows access to channel 0:
> ========== RELEVANT CONTENTS OF PCM3680.conf: =====================
> # Sample configuration for an Advantech PCM-3680 board
> # memory mapped, 2 channels with 2xSJA1000
> # the configuration can be loaded with the cansetup utility  
> #
> # A configuration record contains all parameter settings for a CAN channel
> # (here channel 0 for example )
> # 
> # Base_0=<base address> ()
> #         Addresses between 0xc0000 and 0xdc000 are possible
> #               0xc0000 not recommended - it the video adapter area
> #        please remember to enable the access to this are within
> #        the PC BIOS
> #
> # Irq_0=<irq number>    (5..7)
> #
> # Baud_0=<baudrate>     (one of 10,20,40,50,125,250,500,800,1000 )
> #
> # Timeout_0=10          (timeout for polling in milliseconds recommended 
> 10..100)
> #
> # Outc_0=<output configuration register value> (0=default, transceiver 
> configuration, board specific)
> 
> # Channel 0
> ########################################
> Base_0=0xdb000
> Irq_0=12
> Baud_0=250
> Timeout_0=100
> Outc_0=0xda
> 
> # Channel 1
> ########################################
> Base_1=0xdb200
> Irq_1=15
> Baud_1=250
> Timeout_1=100
> Outc_1=0xda

Looks like memory mapped accesses are required. Please try the
xeno_can_mem driver as show below:

  # modprobe xeno_can_mem mem=0xda0000,0xdb200 irq=12,15 ocr=0xda,0xda

Not sure what the output configurations register is. The driver supports
the module parameters "ocr=" to specify the output *control* register,
which is most likely the same register. For further information, please
search for "ocr" in:


http://www.rts.uni-hannover.de/xenomai/lxr/source/ksrc/drivers/can/sja1000/rtcan_mem.c

Wolfgang.


_______________________________________________
Xenomai mailing list
[email protected]
http://www.xenomai.org/mailman/listinfo/xenomai

Reply via email to