* RE: [Xenomai-help] RT-SocketCan + Xenomai on MPC5200B
[not found] <ac3922a00611070616s6efa5e39wa8a2b849d9fc683b@domain.hid>
@ 2006-11-07 14:39 ` Daniel Schnell
2006-11-07 15:02 ` Wolfgang Grandegger
0 siblings, 1 reply; 8+ messages in thread
From: Daniel Schnell @ 2006-11-07 14:39 UTC (permalink / raw)
To: Syed Amer Gilani; +Cc: xenomai
Syed Amer Gilani wrote:
> I had similar problems, but with a 2.6.18 Kernel. Check you Kernel
> configurations of mscan. The default clock of 66Mhz is possibly
> wrong, on my mpc5200b board it is 33Mhz. And also check the Pin
> Configuration. I had also no termination on board, so i had to add it
> to the cable.
Hi,
This fixed it: setting it from 66MHz to 33MHz in the MSCAN
configuration. At least the IOUnit gets messages now. Thanks a lot !!
If now only the clock_nanosleep() would wait as long as expected and
would not return after 1/4 of the time ....
Best regards,
Daniel.
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [Xenomai-help] RT-SocketCan + Xenomai on MPC5200B
2006-11-07 14:39 ` [Xenomai-help] RT-SocketCan + Xenomai on MPC5200B Daniel Schnell
@ 2006-11-07 15:02 ` Wolfgang Grandegger
0 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Grandegger @ 2006-11-07 15:02 UTC (permalink / raw)
To: Daniel Schnell; +Cc: xenomai
Daniel Schnell wrote:
> Syed Amer Gilani wrote:
>
>> I had similar problems, but with a 2.6.18 Kernel. Check you Kernel
>> configurations of mscan. The default clock of 66Mhz is possibly
>> wrong, on my mpc5200b board it is 33Mhz. And also check the Pin
>> Configuration. I had also no termination on board, so i had to add it
>> to the cable.
>
>
> Hi,
>
> This fixed it: setting it from 66MHz to 33MHz in the MSCAN
> configuration. At least the IOUnit gets messages now. Thanks a lot !!
I will make this the default on MPC5200B. You are not the first on
stumbling over this quirk.
> If now only the clock_nanosleep() would wait as long as expected and
> would not return after 1/4 of the time ....
Do you have a little demo program demonstrating the problem?
Wolfgang.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Xenomai-help] RT-SocketCan + Xenomai on MPC5200B
@ 2006-11-07 13:43 Daniel Schnell
2006-11-07 14:03 ` Wolfgang Grandegger
0 siblings, 1 reply; 8+ messages in thread
From: Daniel Schnell @ 2006-11-07 13:43 UTC (permalink / raw)
To: xenomai
[-- Attachment #1: Type: text/plain, Size: 645 bytes --]
Hi,
I am struggling with Xenomai latest SVN and RT-Socket-CAN on a MPC5200B
with MSCAN driver inside a Denx 2.4.25 kernel.
Does anybody have this configuration actively running ? How do you use
the provided rtcansend/rtcanreceive functions, so they actually transfer
data over the wires ?
I was doing the following:
rtcanconfig rtcan0 -b 125000 start
rtcansend rtcan0 -i 0 0x1 0x0
(returns)
rtcansend rtcan0 -i 0x1 0x0
(hangs, never comes back)
Actually the first rtcansend command does not seem to work, because a
connected CAN IO unit doesn't show any reaction.
Any ideas ?
Regards,
Daniel Schnell.
[-- Attachment #2: Type: text/html, Size: 2735 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xenomai-help] RT-SocketCan + Xenomai on MPC5200B
2006-11-07 13:43 Daniel Schnell
@ 2006-11-07 14:03 ` Wolfgang Grandegger
2006-11-07 14:22 ` Daniel Schnell
0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Grandegger @ 2006-11-07 14:03 UTC (permalink / raw)
To: Daniel Schnell; +Cc: xenomai
Daniel Schnell wrote:
> Hi,
>
> I am struggling with Xenomai latest SVN and RT-Socket-CAN on a MPC5200B
> with MSCAN driver inside a Denx 2.4.25 kernel.
>
> Does anybody have this configuration actively running ? How do you use
Yes.
> the provided rtcansend/rtcanreceive functions, so they actually transfer
> data over the wires ?
>
> I was doing the following:
> rtcanconfig rtcan0 -b 125000 start
> rtcansend rtcan0 -i 0 0x1 0x0
> (returns)
> rtcansend rtcan0 -i 0x1 0x0
> (hangs, never comes back)
>
> Actually the first rtcansend command does not seem to work, because a
> connected CAN IO unit doesn't show any reaction.
The first message seems not to go out to the wire and the second send
blocks because the TX done interrupt of the first message has not yet
occured (no TX hardware slot free). Is there a CAN node able to receive
the message?
> Any ideas ?
Likely, you have a problem with your clock setting, TX/RX routing or
cabeling (termination etc.).
Wolfgang.
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [Xenomai-help] RT-SocketCan + Xenomai on MPC5200B
2006-11-07 14:03 ` Wolfgang Grandegger
@ 2006-11-07 14:22 ` Daniel Schnell
2006-11-07 14:35 ` Wolfgang Grandegger
2006-11-07 20:31 ` Wolfgang Denk
0 siblings, 2 replies; 8+ messages in thread
From: Daniel Schnell @ 2006-11-07 14:22 UTC (permalink / raw)
Cc: xenomai
Wolfgang Grandegger wrote:
> The first message seems not to go out to the wire and the second send
> blocks because the TX done interrupt of the first message has not yet
> occured (no TX hardware slot free). Is there a CAN node able to
> receive the message?
Yes, there is an IO unit which normally reacts on that message
> Likely, you have a problem with your clock setting, TX/RX routing or
> cabeling (termination etc.).
I would suspect it is the clock setting, as we have also problems with
clock_nanosleep() running 4 times too fast. I assume then that the IPB
clock frequency is wrong ?
How do you setup your CAN network for a test ? Which commands do you use
?
Best regards,
Daniel Schnell.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xenomai-help] RT-SocketCan + Xenomai on MPC5200B
2006-11-07 14:22 ` Daniel Schnell
@ 2006-11-07 14:35 ` Wolfgang Grandegger
2006-11-07 14:45 ` Daniel Schnell
2006-11-07 20:31 ` Wolfgang Denk
1 sibling, 1 reply; 8+ messages in thread
From: Wolfgang Grandegger @ 2006-11-07 14:35 UTC (permalink / raw)
To: Daniel Schnell; +Cc: xenomai
Daniel Schnell wrote:
> Wolfgang Grandegger wrote:
>
>> The first message seems not to go out to the wire and the second send
>> blocks because the TX done interrupt of the first message has not yet
>> occured (no TX hardware slot free). Is there a CAN node able to
>> receive the message?
>
> Yes, there is an IO unit which normally reacts on that message
>
>> Likely, you have a problem with your clock setting, TX/RX routing or
>> cabeling (termination etc.).
>
>
> I would suspect it is the clock setting, as we have also problems with
> clock_nanosleep() running 4 times too fast. I assume then that the IPB
> clock frequency is wrong ?
On a Rev. B you normally set the CAN system clock to 33MHz via kernel
configuration parameter. Is CAN TX/RX on PSC2?
> How do you setup your CAN network for a test ? Which commands do you use
> ?
Your setup with rtcanconfig was OK, or what do you mean.
Do you have terminators on both ends of the cable?
Wolfgang.
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [Xenomai-help] RT-SocketCan + Xenomai on MPC5200B
2006-11-07 14:35 ` Wolfgang Grandegger
@ 2006-11-07 14:45 ` Daniel Schnell
0 siblings, 0 replies; 8+ messages in thread
From: Daniel Schnell @ 2006-11-07 14:45 UTC (permalink / raw)
To: xenomai
Wolfgang Grandegger wrote:
> On a Rev. B you normally set the CAN system clock to 33MHz via kernel
> configuration parameter. Is CAN TX/RX on PSC2?
Yes 33 MHz was the magic number. Hmmm, shouldn't that not be set
automatically if MPC5200B is selected ?
The CAN in our case is on I2C1/TMR01
>> How do you setup your CAN network for a test ? Which commands do you
>> use ?
>
> Your setup with rtcanconfig was OK, or what do you mean.
I mean physically. E.g. for a MPC5200B with two CAN ports you could make
a send/receive ping/pong with a sort of nullmodem cable. Additionally
you need a test case. Just wanted to know how your test setup looks
like.
> Do you have terminators on both ends of the cable?
Yes everything is fine here.
Best regards,
Daniel.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xenomai-help] RT-SocketCan + Xenomai on MPC5200B
2006-11-07 14:22 ` Daniel Schnell
2006-11-07 14:35 ` Wolfgang Grandegger
@ 2006-11-07 20:31 ` Wolfgang Denk
1 sibling, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2006-11-07 20:31 UTC (permalink / raw)
To: Daniel Schnell; +Cc: xenomai
In message <DD39B5C3F4963040ADC9768BE7E430CB014DEFF0@domain.hidl.net> you wrote:
>
> I would suspect it is the clock setting, as we have also problems with
> clock_nanosleep() running 4 times too fast. I assume then that the IPB
> clock frequency is wrong ?
As you can see from the U-Boot startup messages, the IPB clock on
your board is set to 66 MHz.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@domain.hid
Success in marriage is not so much finding the right person as it is
being the right person.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-11-07 20:31 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <ac3922a00611070616s6efa5e39wa8a2b849d9fc683b@domain.hid>
2006-11-07 14:39 ` [Xenomai-help] RT-SocketCan + Xenomai on MPC5200B Daniel Schnell
2006-11-07 15:02 ` Wolfgang Grandegger
2006-11-07 13:43 Daniel Schnell
2006-11-07 14:03 ` Wolfgang Grandegger
2006-11-07 14:22 ` Daniel Schnell
2006-11-07 14:35 ` Wolfgang Grandegger
2006-11-07 14:45 ` Daniel Schnell
2006-11-07 20:31 ` Wolfgang Denk
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.