All of lore.kernel.org
 help / color / mirror / Atom feed
From: prathika <prathika@deeopl.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] ppc-4xx timer application problem
Date: Wed, 01 Jul 2009 14:36:13 +0530	[thread overview]
Message-ID: <4A4B2705.9090507@deeopl.com> (raw)

hi all,
I am working on PPC440EP based board.I have ported u-boot on the board.
I was able to fix the problem of extracting data from the flash and 
executing it.
Now I want to run a timer based application on u-boot.  I am expecting 
periodical interrupts based on my configured value.
I have written a timer application but there is no interrupts with 
respect to my configuration.
--I have configured GPT0_COMP6 with 0x120 and CPT0_MASK6 registers with 
value 0x0.
--I disabled the Interrupt mask bit in GPT0_IM register for Compare Timer6.
--I have enabled interrupt in GPT0_IE register for Compare Timer6.
--I am installing interrupt handler for Compare Timer6 using 
install_hdlr() function.

When I run this application, the behaviour is like this:
Interrupts are generated when the GPT0_TBC overflows to a certain value 
that is not equal to my GPT0_COMP6 value. That is the TBC counts 
continously,
overflows from 0xFFFFFFFF to 0x0 and then there is a interrupt when TBC 
value is 0x22b. And still the TBC continues to count even though I am 
writing 0x0 in my interrupt handler, overflows and when again
it reaches 0x22b, there is a interrupt generated, and this 0x22b value 
is not fixed, sometimes its 0x22b and sometimes its 0x220.

Some one please help me in this regard and point out where am I going 
wrong? Is the behaviour I am expecting from the timer right and the 
timer misbehaving? Or have I not understood it's behaviour properly?

Thanks & Regards,
Prathika R

                 reply	other threads:[~2009-07-01  9:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4A4B2705.9090507@deeopl.com \
    --to=prathika@deeopl.com \
    --cc=u-boot@lists.denx.de \
    /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.