Disable Interrupt.

"Rajesh" <[email protected]> Tue, 03 Oct 2006 11:54:29 -0000
Newsgroups gmane.comp.hardware.motorola.microcontrollers
Message-ID <[email protected]>
Hi Everyone,
             I am working with MPC566. I have written one function
that runs at every 10 milisec and this time is generated using PIT
interrupt timer.
Now in my main() function , I want to disable the interrupt for
another function "ADC()" (in main() only) and then re-enable, once the
execution of this function is over. It seems,the isr function is not
running at fixed time interval of 10 milisec.
Can anyone please tell me,the code that I have written to
disable/enable interrupt is correct or not?
My code is like this:

pit_isr()
{
DAC();
}

main()
{

init_pit();

/*--diable interrupt--*/

USIU.PISCR.B.PIE=0;

ADC();

USIU.PISCR.B.PS=1;
USIU.PISCR.B.PIE=1;

/*--re-enable interrupt--*/

}


-regards
Rajesh
















-----------------------------------------------------------
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/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/MPC500/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> 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/