RE: PIT interrupt example from mpc555 application note AN2109

"Dobbin Allan-r11834" <[email protected]>
Newsgroups gmane.comp.hardware.motorola.microcontrollers
Message-ID <4147ED8B92A864498825C07E53594E4A3229B3@az33exm20.fsl.freescale.net>
I've never tried decrementing the counter manually, but I definitely do
NOT recommend it!

If the counter is not decrementing, you probably don't have the correct
RTC input clock source selected - try changing the value of SCCR[RTSEL].

Hopefully the above will get the counter decrementing. To enable the
interrupt, perform a sequence of events similar to the following:

	USIU.PITCK.R = UNLOCK;		/* Unlock PIT counter reg. */
	USIU.PITC.B.PITC = value;	/* PIT interval */
	USIU.PITCK.R = LOCK;		/* lock PIT counter reg. */
	USIU.PISCR.B.PS = 1;		/* clear the pending flag */
	USIU.PISCRK.R = UNLOCK;		/* Unlock PIT status reg. */
	USIU.PISCR.R = 0x0007 | (PIT_LEVEL<<8);		/* Enable PIT
*/

To service the PIT interrupt :
    USIU.PISCRK.R = UNLOCK;		/* Unlock PIT status reg. */
    USIU.PISCR.B.PS = 1;		/* service interrupt by clearing
PS - write 1 to clear */

Regards,
Allan


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of sripathy23
Sent: Tuesday, September 06, 2005 5:03 PM
To: [email protected]
Subject: [MPC500] PIT interrupt example from mpc555 application note
AN2109


Dear members

I tried to run the example "For a single interrupt source". instead of 
using SCI i am using PIT. the code is running but the counter value 
PITR or PITC is not decrementing to zero for an interrupt to be 
generated. Only when the counter decrements to zero I will be able to 
generate an exception at 0x0500. how should i decrement the counter. 
whether the counter will decrement automatically or should i manually 
decrement it.

I would appreciate if anyone can answer this question.
Thanks
Sripathy





-----------------------------------------------------------
To learn more about Freescale Microcontrollers, please visit
http://www.freescale.com/mcu


 
Yahoo! Groups Links



 




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/dN_tlB/TM
--------------------------------------------------------------------~-> 

-----------------------------------------------------------
To learn more about Freescale Microcontrollers, please visit
http://www.freescale.com/mcu


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/MPC500/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.