From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Roberto Bielli <roberto.bielli@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] preemptive doesn't work
Date: Wed, 04 Apr 2012 11:45:35 +0200 [thread overview]
Message-ID: <4F7C183F.5040009@domain.hid> (raw)
In-Reply-To: <4F7C1484.5090406@domain.hid>
On 04/04/2012 11:29 AM, Roberto Bielli wrote:
> Hi Gilles,
>
> i have always this big problem but the timer and the avic are programmed
> correctly.
> There is something else but i don't know what.
> In this moment i'm doing another work but soon i want to debug that error.
It is undoubtly a timer ack/program issue. There is no other problem,
the trace is quite clear: the timer is programmed, should tick, but
does not.
I had a look at the imx code again for other reasons, what may be also
missing in __ipipe_mach_acktimer function is a read of the timer status
register. As in:
void __ipipe_mach_acktimer(void)
{
uint32_t tstat;
if (timer_is_v2())
tstat = __raw_readl(timer_base + V2_TSTAT);
else
tstat = __raw_readl(timer_base + MX1_2_TSTAT);
gpt_irq_acknowledge();
}
And put that piece of code in mxc_timer_interrupt in the #ifndef
CONFIG_IPIPE section.
You may also want to issue a register read after programming the
compare register. As in:
void __ipipe_mach_set_dec(unsigned long delay)
{
if (delay > mxc_min_delay) {
unsigned long tcmp;
if (!timer_is_v2()) {
tcmp = __raw_readl(timer_base + MX1_2_TCN) + delay;
__raw_writel(tcmp, timer_base + MX1_2_TCMP);
__raw_readl(timer_base + MX1_2_TCN);
} else {
tcmp = __raw_readl(timer_base + V2_TCN) + delay;
__raw_writel(tcmp, timer_base + V2_TCMP);
__raw_readl(timer_base + V2_TCN);
}
} else
ipipe_trigger_irq(__ipipe_mach_timerint);
}
--
Gilles.
next prev parent reply other threads:[~2012-04-04 9:45 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-02 10:42 [Xenomai-core] Xenomai server down Gilles Chanteperdrix
2012-03-06 7:55 ` [Xenomai-core] preemptive doesn't work Roberto Bielli
2012-03-06 9:22 ` Gilles Chanteperdrix
[not found] ` <4F55E390.8090706@domain.hid>
2012-03-06 12:09 ` [Xenomai-help] " Gilles Chanteperdrix
2012-03-06 13:00 ` Roberto Bielli
2012-03-06 13:04 ` Gilles Chanteperdrix
2012-03-06 15:14 ` Roberto Bielli
2012-03-06 15:20 ` Gilles Chanteperdrix
2012-03-06 15:35 ` Roberto Bielli
2012-03-06 16:16 ` Gilles Chanteperdrix
2012-03-07 12:59 ` Roberto Bielli
2012-03-07 13:44 ` Gilles Chanteperdrix
2012-03-07 18:13 ` Roberto Bielli
2012-03-13 10:45 ` [Xenomai-core] Fwd: " Roberto Bielli
2012-03-13 11:44 ` [Xenomai-core] " Gilles Chanteperdrix
2012-03-13 12:10 ` Gilles Chanteperdrix
2012-04-04 9:21 ` Gilles Chanteperdrix
2012-04-04 9:29 ` Roberto Bielli
2012-04-04 9:45 ` Gilles Chanteperdrix [this message]
2012-04-06 15:35 ` Roberto Bielli
2012-04-06 15:40 ` Gilles Chanteperdrix
2012-04-06 16:59 ` Roberto Bielli
2012-04-07 22:17 ` Gilles Chanteperdrix
2012-04-10 8:18 ` Roberto Bielli
2012-04-10 8:22 ` Gilles Chanteperdrix
2012-04-10 8:43 ` Roberto Bielli
2012-04-10 8:45 ` Gilles Chanteperdrix
2012-04-10 8:58 ` Roberto Bielli
2012-04-10 9:00 ` Gilles Chanteperdrix
2012-04-10 9:06 ` Gilles Chanteperdrix
2012-04-10 9:11 ` Gilles Chanteperdrix
2012-04-10 9:21 ` Roberto Bielli
2012-04-10 9:27 ` Gilles Chanteperdrix
2012-04-10 9:37 ` Gilles Chanteperdrix
2012-04-10 10:39 ` Roberto Bielli
2012-04-10 11:25 ` Gilles Chanteperdrix
2012-04-10 12:05 ` Roberto Bielli
2012-04-10 12:06 ` Gilles Chanteperdrix
2012-04-10 12:11 ` Roberto Bielli
2012-04-10 12:12 ` Gilles Chanteperdrix
2012-04-10 12:18 ` Roberto Bielli
2012-04-10 11:49 ` Gilles Chanteperdrix
2012-04-10 12:33 ` Roberto Bielli
2012-04-10 12:36 ` Gilles Chanteperdrix
2012-04-10 12:58 ` Roberto Bielli
2012-04-10 15:55 ` Gilles Chanteperdrix
2012-04-10 12:40 ` Gilles Chanteperdrix
2012-04-11 6:59 ` Roberto Bielli
2012-04-11 11:59 ` Gilles Chanteperdrix
2012-04-11 12:10 ` Gilles Chanteperdrix
2012-04-12 10:12 ` Roberto Bielli
2012-04-12 16:58 ` [Xenomai-core] porting xenomai on imx25 Roberto Bielli
2012-04-12 17:40 ` Gilles Chanteperdrix
2012-04-13 8:44 ` Roberto Bielli
2012-04-13 13:47 ` Gilles Chanteperdrix
2012-04-18 8:44 ` Roberto Bielli
2012-04-18 9:19 ` Gilles Chanteperdrix
2012-04-18 10:28 ` Roberto Bielli
2012-04-18 11:51 ` Gilles Chanteperdrix
2012-04-19 8:52 ` Roberto Bielli
2012-04-19 8:54 ` Gilles Chanteperdrix
2012-04-19 9:01 ` Roberto Bielli
2012-04-19 9:02 ` Gilles Chanteperdrix
2012-04-19 12:11 ` Gilles Chanteperdrix
2012-04-12 17:32 ` [Xenomai-core] preemptive doesn't work Gilles Chanteperdrix
2012-04-10 12:52 ` Gilles Chanteperdrix
2012-04-10 9:19 ` Roberto Bielli
2012-04-10 9:19 ` 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=4F7C183F.5040009@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=roberto.bielli@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.