All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] CAN
@ 2008-04-09 13:23 Urs Eichholzer
  2008-04-09 13:49 ` Wolfgang Grandegger
  0 siblings, 1 reply; 2+ messages in thread
From: Urs Eichholzer @ 2008-04-09 13:23 UTC (permalink / raw)
  To: xenomai

Hi

We are using Linux 2.6.19.2 and Xenomai 2.3.0

The problem disapeared when we not changed the baudrate (we try to scan the
bus..). What shoult be the time between changing the baudrate?

Thank's

Urs

From: Wolfgang Grandegger [wg@domain.hid]
Sent: Wednesday, April 09, 2008 12:19 AM
To: Urs Eichholzer
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] CAN Probleme

Hi Urs,

Urs Eichholzer wrote:
> Hello
>
> We are just start to use the setup...
> We try to read parameters from a device true the CAN. From some
> parameters we get proper replay and with other parameters we get the
> following message:
> rtcan0: btr0=0x05 btr1=0x4f
> rtcan0: btr0=0x0a btr1=0x6f
> rtcan_mscan_start_xmit: TX buffer not empty

Hm, this message is pretty fatal. What version of Linux and Xenomai do you use?
What type of parameters do you read when the error message shows up. Can you
reproduce the problem with a little example program?

Thanks,


----------------------------------------------------------------
This message was sent using Samart Web Mail 2005.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Xenomai-help] CAN
  2008-04-09 13:23 [Xenomai-help] CAN Urs Eichholzer
@ 2008-04-09 13:49 ` Wolfgang Grandegger
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Grandegger @ 2008-04-09 13:49 UTC (permalink / raw)
  To: Urs Eichholzer; +Cc: xenomai

[-- Attachment #1: Type: text/plain, Size: 1279 bytes --]

Urs Eichholzer wrote:
> Hi
> 
> We are using Linux 2.6.19.2 and Xenomai 2.3.0

Xenomai 2.3.0 is quite old and I recommand to  update to 2.3.5., at lreast

> The problem disapeared when we not changed the baudrate (we try to scan the
> bus..). What shoult be the time between changing the baudrate?

Ah, I see. Does the attached patch help?

Wolfgang.


> Thank's
> 
> Urs
> 
> From: Wolfgang Grandegger [wg@domain.hid]
> Sent: Wednesday, April 09, 2008 12:19 AM
> To: Urs Eichholzer
> Cc: xenomai@xenomai.org
> Subject: Re: [Xenomai-help] CAN Probleme
> 
> Hi Urs,
> 
> Urs Eichholzer wrote:
>> Hello
>>
>> We are just start to use the setup...
>> We try to read parameters from a device true the CAN. From some
>> parameters we get proper replay and with other parameters we get the
>> following message:
>> rtcan0: btr0=0x05 btr1=0x4f
>> rtcan0: btr0=0x0a btr1=0x6f
>> rtcan_mscan_start_xmit: TX buffer not empty
> 
> Hm, this message is pretty fatal. What version of Linux and Xenomai do you use?
> What type of parameters do you read when the error message shows up. Can you
> reproduce the problem with a little example program?
> 
> Thanks,
> 
> 
> ----------------------------------------------------------------
> This message was sent using Samart Web Mail 2005.
> 
> 


[-- Attachment #2: xenomai-rtcan-mscan.patch --]
[-- Type: text/x-patch, Size: 480 bytes --]

Index: rtcan_mscan.c
===================================================================
--- rtcan_mscan.c	(revision 3454)
+++ rtcan_mscan.c	(working copy)
@@ -358,6 +358,10 @@ static int rtcan_mscan_mode_stop(struct 
     if (!CAN_STATE_OPERATING(state))
         goto out;
 
+    regs->canrier = 0;
+    if (!(regs->cantflg & MSCAN_TXE0))
+	    regs->cantarq = MSCAN_TXE0;
+
     /* Switch to sleep mode */
     regs->canctl0 |= MSCAN_SLPRQ;
     regs->canctl0 |= MSCAN_INITRQ;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-04-09 13:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-09 13:23 [Xenomai-help] CAN Urs Eichholzer
2008-04-09 13:49 ` Wolfgang Grandegger

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.