public inbox for linux-can@vger.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Grandegger <wg@grandegger.com>
To: Mohamed HAMZAOUI <requinham@gmail.com>
Cc: Oliver Hartkopp <oliver.hartkopp@volkswagen.de>,
	linux-can Mailing List <linux-can@vger.kernel.org>
Subject: Re: [SocketCan] Problem of accuracy
Date: Mon, 09 Jul 2012 10:20:54 +0200	[thread overview]
Message-ID: <4FFA9466.3040600@grandegger.com> (raw)
In-Reply-To: <CABMxt4jXUqtEyyhbnm80CW2CVQ7CD2He3ectdivn+aTodu+Y5w@mail.gmail.com>

On 07/09/2012 10:14 AM, Mohamed HAMZAOUI wrote:
> I cannot use the 2.6.33 kernel version because it's not support my
> board and, until this moment only, the kernel version 2.6.32*  can be
> found for my board for which i can not find any adeos patch or
> preempt-rt patch

I was thinking about Linux > 3.4. Anyway, I understand your problem.
Xenomai will not help without extra effort because there is no RT-CAN
driver for the TI HECC. What are your real-time requirements?

> I will test the patch for ti_hecc.c and i will return for you.
> * (TI provide a 2.6.37 kernel version but with problem Kernel PANIC !)

:(

Wolfgang.

> On Mon, Jul 9, 2012 at 9:18 AM, Wolfgang Grandegger <wg@grandegger.com> wrote:
>> On 07/08/2012 10:30 PM, Mohamed HAMZAOUI wrote:
>>> The other transeiver is a KVASER USBCan II (HS,HS) it's an usb gateway
>>> CAN and it's accurate because i use it with other CAN transeiver
>>> (IXXAT PCI or Vector CanboardXL) and i have always the same result.
>>
>> Well, I would not use a USB CAN controller for accurate timing (if it
>> does not use hardware time stamps). Anyway, I think that's not the
>> problem, as Kurt already pointed out.
>>
>>> My board is Craneboard "AM3517-crane" and i compiled my system with
>>> OpenEmbedded which done : (cat /proc/version) Linux version 2.6.32
>>> (requinham@pearl) (gcc version 4.5.3 20110311 (prerelease) (GCC) ) #1
>>> PREEMPT Fri Jul 6 21:46:07 CEST 2012
>>
>> OK, then you use the ti_hecc driver, which hit mainline in 2.6.33! Could
>> you show as the source of your "drivers/net/can/ti_hecc.c"? There is at
>> least one issue in the early driver version, which makes sense to fix:
>>
>> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=e3f240f460a36b158217944b52a85f304914c1a6
>>
>> If that doesn't help, you should use ftrace to understand what's going
>> on. Well, not sure if ftrace already works with 2.6.32 on ARM... that
>> would be another good reason to update to a more recent version of the
>> kernel. Would that be an option for you?
>>
>> Wolfgang.
>>
>>> On Sun, Jul 8, 2012 at 10:13 PM, Wolfgang Grandegger <wg@grandegger.com> wrote:
>>>> On 07/08/2012 09:43 PM, Mohamed HAMZAOUI wrote:
>>>>> Hi,
>>>>>
>>>>>> This problem is not CAN related. Anyway, you can read/try/check:
>>>>>>
>>>>>> - are high-resolution timers enabled in your kernel?
>>>>>
>>>>> My high resolution timers is enabled in Kernel and i activate
>>>>> Preemptible kernel (low latency desktop)
>>>>>
>>>>>> - use cyclictest [1] to measure user-space timing accuracy.
>>>>>
>>>>> the cyclictest mesure with 0% load is 307 in maximum
>>>>
>>>> You mean 302 us? Did you generate some load? That normally makes a big
>>>> difference.
>>>>
>>>>>
>>>>>> - use clock_nanosleep for periodic tasks.
>>>>>
>>>>> i use clock_nanosleep with (1000000 ns = 1ms) and the result mesured
>>>>> with another CAN transeiver is an average of 1.30 ms (delta = 300 盜)
>>>>> !
>>>>
>>>> That means that you see a period of 1.3ms instead of 1ms? That's really
>>>> strange. I assume that the timing on the system with the other CAN
>>>> transceiver is accurate.
>>>>
>>>>>> - try to start cangen with "chrt -f 10 cangen can0".
>>>>>
>>>>> no effect.
>>>>>
>>>>>> - read "man sched_setscheduler" for a description of the Linux
>>>>>>   scheduling scheme.
>>>>>
>>>>> I test with two type of SCHED : RR and FIFO but the result is same
>>>>>
>>>>> Maybe i need to pass to Xenomai or PREEMPT-RT ?
>>>>
>>>> What system, kernel and CAN controller do you use? Is it an MCP25xx?
>>>>
>>>> Wolfgang.
>>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-can" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>
>>>
>>
>>
> 
> 



  reply	other threads:[~2012-07-09  8:20 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CABMxt4ijuTMYFYXx0n4AYBO6-=SRD0U3F4BTA2=rWE80Z4-yOA@mail.gmail.com>
2012-07-05  8:38 ` Problem of accuracy Oliver Hartkopp
2012-07-07 10:02   ` [SocketCan] " Mohamed HAMZAOUI
2012-07-07 10:32     ` Wolfgang Grandegger
2012-07-08 19:43       ` Mohamed HAMZAOUI
2012-07-08 20:13         ` Wolfgang Grandegger
2012-07-08 20:30           ` Mohamed HAMZAOUI
2012-07-09  7:18             ` Wolfgang Grandegger
2012-07-09  8:14               ` Mohamed HAMZAOUI
2012-07-09  8:20                 ` Wolfgang Grandegger [this message]
2012-07-09  9:19                   ` Mohamed HAMZAOUI
2012-07-09  9:22                     ` Wolfgang Grandegger
     [not found]                       ` <CABMxt4jnztXqAmLFcBnqp3001QXds1nX3xA2y_ka=xCNr0cjjA@mail.gmail.com>
     [not found]                         ` <4FFAB09F.6090800@grandegger.com>
     [not found]                           ` <CABMxt4jLRKz8xKNbH3Qa=P0k1aEjMsqmo2vArGDo2O1Wf0=wGQ@mail.gmail.com>
2012-07-09 11:26                             ` Fwd: " Mohamed HAMZAOUI
2012-07-09 11:40                             ` Wolfgang Grandegger
2012-07-09 11:57                               ` Mohamed HAMZAOUI
2012-07-09 12:15                                 ` Wolfgang Grandegger
2012-07-09 13:19                                 ` Pavel Pisa
2012-07-09 14:29                                   ` Mohamed HAMZAOUI
2012-07-09 14:35                                   ` Mohamed HAMZAOUI
2012-07-09 14:40                                   ` Kurt Van Dijck
2012-07-09 14:57                                     ` Alexander Stein
2012-07-09 15:39                                       ` Mohamed HAMZAOUI
2012-07-09 17:08                                         ` Oliver Hartkopp
2012-07-09 20:50                                         ` Wolfgang Grandegger
2012-07-10 22:11                                           ` Mohamed HAMZAOUI
2012-07-11 12:35                                             ` Mohamed HAMZAOUI
2012-07-11 22:22                                               ` Wolfgang Grandegger
2012-07-11 22:19                                             ` Wolfgang Grandegger
2012-07-09  6:55           ` Kurt Van Dijck
     [not found] ` <1341488146.2416.9.camel@slaptop>
2012-07-05 13:57   ` [Socketcan-users] back to back can frames Kurt Van Dijck

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=4FFA9466.3040600@grandegger.com \
    --to=wg@grandegger.com \
    --cc=linux-can@vger.kernel.org \
    --cc=oliver.hartkopp@volkswagen.de \
    --cc=requinham@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox