All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: aubin.rebillat@domain.hid
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Xenomai on the TS-7553 ARM SBC
Date: Thu, 10 May 2012 19:42:26 +0200	[thread overview]
Message-ID: <4FABFE02.6080509@domain.hid> (raw)
In-Reply-To: <479588872.145094722.1336670966752.JavaMail.root@domain.hid>

On 05/10/2012 07:29 PM, aubin.rebillat@domain.hid wrote:
>> Also, from the sources I could gather (snakeos-sdk), the hardware
>> timer
>> for str8100 is programmed in periodic, auto-reload mode. Obviously,
>> when
>> CONFIG_IPIPE is on, you have to change this to make the timer run in
>> one-shot mode, as required by Xenomai.
> 
> I did not know that it was required, i thought it was handy not to reprogram 
> the timer each time.

That is likely your problem. You can not assume that a decreasing
counter is all of a sudden a free-running counter with match register.
You have to find the processor datasheet and look at how its registers
must be programmed to run in one-shot mode, if at all possible.

Note that since linux 2.6.24, linux itself switched to one-shot mode,
because it allows high resolution software timers.

>>> #ifdef CONFIG_IPIPE
>>> void __ipipe_mach_demux_irq(unsigned irq, struct pt_regs *regs)
>>> {
>>>   // No cascaded interrupt using the VIC
>>> }
>>> #endif /* CONFIG_IPIPE */
>>
>> You probably do not need to define this function if you #define
>> ipipe_mach_irq_mux_p to always be 0.
>>
> 
> I do, to avoid an undefined reference.

If you #define ipipe_mach_irq_mux_p(irq) 0

The compilers optimizes away the function call, and there is no
undefined reference. At least with current compilers.

> 
> Nevertheless, thank you very much for all this.
> 
> When i developped the IPIPE code for this board i followed the
> HOWTO but it's quite vague so I mostly read what has been done 
> with other boards and what has been done with linux for this board 
> to implement it.

This HOWTO assumes that you understand what you are doing. No HOWTO
guide is a substitute for that unfortunately.

> Therefore, I'm clearly not aware of the interactions between Linux 
> and Xenomai. I will definitely read the publications available on 
> the Xenomai website.

Well, it is not all that complicated. When xenomai wants to program the
timer it calls ipipe_mach_set_dec, and when a timer interrupt happens,
ipipe_mach_acktimer is called, whether the timer is handled by Linux, or
it has been taken over by Xenomai.

-- 
					    Gilles.


  reply	other threads:[~2012-05-10 17:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <80969791.144436365.1336656376390.JavaMail.root@domain.hid>
2012-05-10 13:26 ` [Xenomai-help] Xenomai on the TS-7553 ARM SBC aubin.rebillat
2012-05-10 13:42   ` Gilles Chanteperdrix
2012-05-10 15:18     ` aubin.rebillat
2012-05-10 15:30       ` Gilles Chanteperdrix
2012-05-10 16:04         ` aubin.rebillat
2012-05-10 16:34           ` Gilles Chanteperdrix
2012-05-10 17:29             ` aubin.rebillat
2012-05-10 17:42               ` Gilles Chanteperdrix [this message]
2012-05-14 16:13                 ` aubin.rebillat
2012-05-14 16:18                   ` Gilles Chanteperdrix
2012-05-14 18:54                     ` Gilles Chanteperdrix
2012-05-15 14:34                       ` aubin.rebillat
2012-05-15 14:37                         ` Gilles Chanteperdrix
2012-05-10 17:28   ` Gilles Chanteperdrix
2012-05-10 17:38     ` aubin.rebillat
2012-05-10 17:48       ` Gilles Chanteperdrix

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=4FABFE02.6080509@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=aubin.rebillat@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.