Re: Disable Interrupt.

"ar_manjunath" <[email protected]> Wed, 04 Oct 2006 07:18:46 -0000
Newsgroups gmane.comp.hardware.motorola.microcontrollers
Message-ID <[email protected]>
Hi Rajesh,

     I feel that your code is perfectly alright. 
There are only 2 reasons why your ISR is not called every 10ms.
  1. Your reload timer value may not be correct. Please check this 
     once again.
  2. The Interrupt handler (i.e. your DAC() subroutine) may be 
     executing for more than 10ms and thus causing this malfunction.

regards
Manjunath A.R.



--- In [email protected], "Rajesh" <rajesh86us@...> wrote:
>
> 
> 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/