RE: Help on Nested Interrupt
"Dobbin Allan-r11834" <[email protected]>
| Newsgroups | gmane.comp.hardware.motorola.microcontrollers |
|---|---|
| Message-ID | <4147ED8B92A864498825C07E53594E4AD48573@az33exm20.fsl.freescale.net> |
Rajesh, nested interrupts are certainly possible but can be tricky to master the first time. Based on your description of your problem, its not clear to me that you actually need nested interrupts at all and I'd ask you to reconsider if you need them (see below). If you are calling send data every 10ms from the PIT interrupt, you don't have to use an SCI interrupt at all as the PIT is handling that. So this leaves you with only PIT interrupts, no nesting reqd. On the other hand, if you mean you want the PIT to call sci tx only once, and then you want the sci to interrupt independantly, then there is no need to use nested interrupts for this either. You should be handling your PIT interrupt and exiting the ISR relatively quickly, so then the level 1 SCI tx ISR is free to interrupt once the PIT has exited. The question is do you need the level 0 PIT to interrupt the level 1 sci without waiting until the sci ISR terminates? If so, then that's a reason for needing nested interrupts. Start by setting the RI and EE bits in the MSR and stacking anything else you need - there is a good apps note on MPC500 interrupts. I'd also suggest you turn off the PIT interrupt temporary to allow you to debug your sci interrupt and prove it works without nesting i.e. prove that your problem is nesting and not simply setting up sci tx interrupts. Hope this helps, Allan -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Rajesh Sent: Wednesday, April 05, 2006 6:20 AM To: [email protected] Subject: [MPC500] Help on Nested Interrupt Hi Grp members, I am working on MPC566EVB with codewarrior 8.1 compiler. I am able to generate a 10 milisec of interrupt(Level 0)using PIT. I want to run a "send_data" function with this 10 ms of interval that continuously sends data through UART. At present I am assigning this "send_data" function as LEVEL1 interrupt and calling within the Level 0 interrupt (ISR). Also I am enabling the Nested Interrupt, but its not working. Hope I am able to define my problem,Can anyone help me on this? -regards Rajesh ----------------------------------------------------------- To learn more about Freescale Microcontrollers, please visit http://www.freescale.com/mcu Yahoo! Groups Links ----------------------------------------------------------- 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/