Thank you all for your feedback, your comments were much appreciated. The problem was associated with a bug with the imagecraft compiler apparently. All code checked out in the generated .lst file and nothing appeared to be wrong however i could still not get an isr to interrupt another isr (ie: when clearing 'I' within an isr) or could not even get an isr to be honoured and executed after the currently executing isr had returned. Putting a asm(" nop"); just before the code which re-enables the interrupt in each isr fixed the problem. Dont fully understand why (it made no difference to the code appearing in the .lst file...except for the new instuction).......but it made all the difference. Thanks again all "Redd, Emmett R" <> wrote: Do you issue a CLI instruction in your RTI_ISR? The HC11 automatically sets the I bit in the CCR when an interrupt is called. So if your RTI_ISR becomes the "main", it is not surprising all other interrupts are inhibited unless you clear the interrupt bit within it. Emmett Redd Ph.D. mailto: Associate Professor (417)836-5221 Department of Physics, Astronomy, and Materials Science Southwest Missouri State University Fax (417)836-6226 901 SOUTH NATIONAL Dept (417)836-5131 SPRINGFIELD, MO 65804 USA > -----Original Message----- > From: Garry Sharpe [mailto:] > Sent: Saturday, October 23, 2004 1:10 AM > To: > Subject: [m68HC11] help ...IC's interrupting an RTI ??? > I am a student that is having trouble getting Input Capture interrupts > (IC2 & IC3) to interrupt an RTI. > > Basics: > > My program, including the RTI, IC2 and IC3 ISR's are written in C whilst > all ports, interrupts etc are initiated in assembly. The code is compiled > using 'Imagecraft C' and loaded to my E2 chip (in bootstrap) using > PCBug11. > (IC2 and IC3 are set for rising and falling edge respectively) > > Problem: > > My project is designed around a Finite State Model, allowing > void main(void) to simply contain a few initial setup instructions and a > while(1); loop, allowing the RTI to take control of the program execution. > > Both IC2 and IC3 interrupts are detected and their ISR's executed when I > disable the RTI and simply call the RTI_ISR(); from main(); as a simple > subroutine. > > This makes me think there is nothing wrong with the coding and setup of > the IC2 and IC3 interrupts, however, When the RTI is operating as a RTI, > the IC2 and IC3 interrupts are simply ignored or not even detected, so > maybe my code is missing something. > > Probably a bit hard to understand as my explanation of the situation is > probably not the best..sorry, however, > > Is there some trick to getting an interrupt to interrupt another interrupt > ? > ie: An IC interrupt to interrupt an RTI > > Any feedback on this subject would be greatly appreciated. > Thankyou --------------------------------- Yahoo! Groups Links To --------------------------------- Find local movie times and trailers on Yahoo! Movies. |