From: Wolfgang Grandegger <wg@domain.hid>
To: Breno <breno@domain.hid>
Cc: xenomai-help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] [Socketcan-users] RT - Socketcan
Date: Sat, 24 May 2008 09:12:40 +0200 [thread overview]
Message-ID: <4837BFE8.40209@domain.hid> (raw)
In-Reply-To: <48372EFE.1070503@domain.hid>
Breno wrote:
> Wolfgang Grandegger wrote:
>> Breno wrote:
>>
>>> Wolfgang Grandegger wrote:
>>>
>>>> Wolfgang Grandegger wrote:
>>>>
>>>>> breno@domain.hid wrote:
>>>>>
>>>>>>> Breno wrote:
>>>>>>>
>>>>>>>> Wolfgang Grandegger wrote:
>>>>>>>>
>>>>>>>>> Breno wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> Wolfgang Grandegger wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> Breno wrote:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> Hi Wolfgang, I got the cannetdriver26 as you suggested some
>>>>>>>>>>>> e-mail
>>>>>>>>>>>> ago. Sorry my ignorance but how can I get it working o my
>>>>>>>>>>>> kernel. I
>>>>>>>>>>>> mentioned before that you have a script do get it build.
>>>>>>>>>>>> Could you
>>>>>>>>>>>> help me again on this issue?
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>> For what kernel?
>>>>>>>>>>>
>>>>>>>>>>> Wolfgang.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>> Hi Wolfgang, I got a DENX Linux 2.6 Kernel Tree from DENX
>>>>>>>>>> project.
>>>>>>>>>> The last
>>>>>>>>>> commit I have is:
>>>>>>>>>>
>>>>>>>>>> commit 76e8fbcc9e3e928a6898a93e6077264f5cb8f432
>>>>>>>>>> Author: Wolfgang Grandegger <wolf@domain.hid>
>>>>>>>>>> Date: Thu Mar 27 17:41:09 2008 +0100
>>>>>>>>>>
>>>>>>>>>> Socket-CAN: merge with SVN trunk revision 690
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>> Can you use linux-2.6.25.4 from kernel.org for your hardware?
>>>>>>>>>
>>>>>>>>> Wolfgang.
>>>>>>>>>
>>>>>>>>>
>>>>>>>> But it doesn't have support for Xenomai, rigth? If so, which
>>>>>>>> version
>>>>>>>> should I use?
>>>>>>>>
>>>>>>> You are right, an ADEOS i-Pipe patch is not yet avaliable for
>>>>>>> 2.6.25.
>>>>>>> Just to understand your requirements. You want to use the Xenomai
>>>>>>> real-time extension because you have hard real-time requirements,
>>>>>>> right?
>>>>>>> Do you want to access the CAN bus from a Xenomai real-time task?
>>>>>>> If yes,
>>>>>>> then you should use RT-Socket-CAN.
>>>>>>>
>>>>>>>
>>>>>>>> Anyway,I got the Denx-2.6.25 and I wanna configure it on my system
>>>>>>>> regardless of this
>>>>>>>> version doesn't have Xenomai support. To get an correct kernel
>>>>>>>> image on
>>>>>>>> my
>>>>>>>> present tree(2.6.24-commit
>>>>>>>> 76e8fbcc9e3e928a6898a93e6077264f5cb8f432 ) I
>>>>>>>> executed make lite5200_defconfig, at the kernel option and I set
>>>>>>>> lite5200.dts
>>>>>>>> and then do make zImage. That new tree seems have some
>>>>>>>> differences, do
>>>>>>>> you
>>>>>>>> know what commands do I have to execute? I'm using lite5200 powerpc
>>>>>>>> board.
>>>>>>>>
>>>>>>> It does not make sense to switch to 2.6.25 now if you have real-time
>>>>>>> requirements. Please stop jumping from one setup to another. If
>>>>>>> something is not working, I'm willing to help.
>>>>>>>
>>>>>>> Wolfgang.
>>>>>>>
>>>>>>>
>>>>>> Hi Wolfgang, thanks for your support. I'm intending to use CAN
>>>>>> along with
>>>>>> rt-tasks. I had dropped the rt-socket CAN because of the error it
>>>>>> appears
>>>>>> when I send messages as explained some e-mails ago. For example:
>>>>>>
>>>>>> ./rtcanconfig rtcan0 -b100000 start ---> works properly!
>>>>>> ./rtcanrecv rtcan1 &
>>>>>> ./rtcansend rtcan0 -i0x123 1 2 3 4 5 6 7 8
>>>>>> #0 [8] <0x123> 00 00 00 04 05 06 07 08 ---> it seems to lose the
>>>>>> threes
>>>>>> first data.
>>>>>>
>>>>> Then let's try to fix that. Have you built and ran rtcansend and
>>>>> rtcanrecv as I suggested (the one created by "$ make" in the
>>>>> Xenomai top
>>>>> directory)? Did it make a difference?
>>>>>
>>>>> Do you see errors when you use the rtcanrecv option "-e 0xffff"?
>>>>>
>>>>> ./rtcanrecv -e 0xffff rtcan1
>>>>>
>>>>>
>>>>>> My socket-can applications works perfectly!!!
>>>>>>
>>>>> Fine, but it's not useful to call Socket-CAN from an Xenomai real-time
>>>>> application. You will loose determinism.
>>>>>
>>>>> And we should continue this thread with CC to the Xenomai-help mailing
>>>>> list because it might be useful for others as well.
>>>>>
>>>> Maybe there is something wrong with your MSCAN clock settings.
>>>>
>>>> What frequency have you specified for
>>>> CONFIG_XENO_DRIVERS_CAN_MSCAN_CLOCK (check your kernel .config)?
>>>>
>>>> And what MPC5200 CPU do you have? Could you show use the initial output
>>>> of your bootloader?
>>>>
>>>> Wolfgang.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>> Hi Wolfgang, I have a stick on my board with lite5200 v2.0b. And at the
>>> top of my processor chip I have MPC5200b. The clock frequency is
>>> 400MHz.
>>>
>>
>> Well, this information does not match the boot output below.
>>
>>
>>> My first messages on boot process is:
>>>
>>> U-Boot 1.1.4 (Feb 10 2006 - 11:06:33)
>>> CPU: MPC5200 v1.2 at 462 MHz
>>>
>>
>> Seems to be a Rev. A CPU at 462 MHz. 1.1.4 is very old, though.
>>
>>
>>> Bus 132 MHz, IPB 66 MHz, PCI 33 MHz
>>>
>>> Board: Motorola MPC5200 (IceCube)
>>>
>>
>> BTW: do you have one or two PCI connectors on the board?
>>
>>
>>> I2C: 85 kHz, ready
>>> DRAM: 64 MB
>>> FLASH: 16 MB
>>> PCI: Bus Dev VenId DevId Class Int
>>> 00 1a 1057 5803 0680 00
>>> In: serial
>>> Out: serial
>>> Err: serial
>>> Net: FEC ETHERNET
>>> IDE: Bus 0: not available Autostarting. Press any key to
>>> abort...
>>> Hit any key to stop autoboot: 5
>>> => tftp
>>> Using FEC ETHERNET device
>>> TFTP from server 192.168.1.100; our IP address is 192.168.1.101
>>> Filename '5200/cuImage.52xx'.
>>> Load address: 0x100000
>>> Loading:
>>> *#################################################################
>>> #################################################################
>>> #################################################################
>>> #################################################################
>>> done
>>> Bytes transferred = 1329135 (1447ef hex)
>>> => bootm
>>> ## Booting image at 00100000 ...
>>> Image Name: Linux-2.6.24.4-g5e9901e9-dirty
>>> Created: 2008-04-15 16:35:09 UTC
>>> Image Type: PowerPC Linux Kernel Image (gzip compressed)
>>> Data Size: 1329071 Bytes = 1.3 MB
>>> Load Address: 00400000
>>> Entry Point: 0040055c
>>> Verifying Checksum ... OK
>>> Uncompressing Kernel Image ... OK
>>>
>>>
>>> The frequency specified on CONFIG_XENO_DRIVERS_CAN_MSCAN_CLOCK is
>>> 66000000Hz. Is that correct?
>>>
>>
>> For MPC5200 Rev. B CPU, it should be 33000000, but you have an old Rev.
>> A CPU and in that case 66000000 is correct.
>>
>> There is some help for corresponding Kconfig option:
>>
>> config XENO_DRIVERS_CAN_MSCAN_CLOCK
>> depends on XENO_DRIVERS_CAN_MSCAN
>> int "Clock Frequency in Hz"
>> default 66000000
>> help
>>
>> The MSCAN driver selects the oscillator clock (SYS_XTAL_IN) as
>> clock source for MSCAN, which is typically 33 MHz. Due to a
>> hardware bug on the MPC5200 Rev. A chips, the IP bus clock
>> (IP_CLK) is used instead, which is typically 66 or 132 MHz.
>>
>> How does your CAN cabling look like. Is the CAN bus properly terminated
>> on both ends?
>>
>> Wolfgang.
>>
> Hi Wolfgang, it's not a professional cable!!! I just use a 10 pins flat
> cable to connect CAN0 and CAN1 on board interfaces for testings, I
> mean, I don't have a bus exactly but just a simple cable. Could you
> pass me a good reference of cables for a property use?
Handmade cables are OK but you need proper termination with 120 Ohm at
both ends of the cable. Either there is on-board termination, sometimes
selectable via jumpers, or you have to add resistors at the end of your
cable. Take an Ohmmeter and measure the resistance between pin 2 and 7
of your connector.
Wolfgang.
next prev parent reply other threads:[~2008-05-24 7:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <60078.189.4.74.190.1209348044.squirrel@domain.hid>
[not found] ` <481580F2.9090707@domain.hid>
[not found] ` <4815BFDA.1040904@domain.hid>
[not found] ` <4815C3A5.1020606@domain.hid>
[not found] ` <4815C937.6000700@domain.hid>
[not found] ` <4815D4B1.8040207@domain.hid>
[not found] ` <481682B8.4050104@domain.hid>
[not found] ` <4816BF96.6010400@domain.hid>
[not found] ` <57472.150.162.12.153.1209499591.squirrel@domain.hid>
[not found] ` <48180F67.4080809@domain.hid>
[not found] ` <482B8494.7050009@domain.hid>
[not found] ` <482BD2D4.5070408@domain.hid>
[not found] ` <482C922E.1080002@domain.hid>
[not found] ` <482C9719.1080803@domain.hid>
[not found] ` <482CA5B9.3030203@domain.hid>
[not found] ` <482CA862.9070105@domain.hid>
[not found] ` <482D988A.8040503@domain.hid>
[not found] ` <48328F76.4090603@domain.hid>
2008-05-20 9:06 ` [Xenomai-help] [Socketcan-users] RT - Socketcan Wolfgang Grandegger
[not found] ` <4833A8F5.5070109@domain.hid>
[not found] ` <4834344E.4090706@domain.hid>
[not found] ` <48344261.2060102@domain.hid>
[not found] ` <4834501C.30709@domain.hid>
[not found] ` <48345105.1060008@domain.hid>
[not found] ` <48353FC2.3060708@domain.hid>
[not found] ` <49280.189.58.74.62.1211542371.squirrel@domain.hid>
2008-05-23 11:51 ` Wolfgang Grandegger
2008-05-23 13:06 ` Wolfgang Grandegger
[not found] ` <48371813.6050007@domain.hid>
2008-05-23 19:52 ` Wolfgang Grandegger
[not found] ` <48372EFE.1070503@domain.hid>
2008-05-24 7:12 ` Wolfgang Grandegger [this message]
[not found] ` <483EC852.3080504@domain.hid>
2008-05-29 15:26 ` Wolfgang Grandegger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4837BFE8.40209@domain.hid \
--to=wg@domain.hid \
--cc=breno@domain.hid \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.