Technical discussions about Freescale Microcontrollers: M68HC11. (Freescale Semiconductor is a Subsidiary of Motorola).
|
Garry --- There is a really old errata for the HC11 that suggests that a NOP may be required before the WAI instruction to assure interrupt availability. This errata goes back years so you may be using some really old mask sets. Perhaps the problem still exists; I suggest that you contact your FAE for guidance. This thing goes back so far that I can't even locate the original MSE for it. Bob Smith --- Avoid computer viruses, Practice safe hex --- -- Specializing in small, cost effective embedded control systems -- http://www.smithmachineworks.com/embedprod.html Robert L. (Bob) Smith Smith Machine Works, Inc. 9900 Lumlay Road Richmond, VA 23236 804/745-2608 ----- Original Message ----- From: "Garry Sharpe" <> To: <> Sent: Sunday, December 05, 2004 7:07 AM Subject: RE: [m68HC11] help ...IC's interrupting an RTI ??? > 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 SponsorADVERTISEMENT > --------------------------------- > Yahoo! Groups Links > > To > > > --------------------------------- > Find local movie times and trailers on Yahoo! Movies. > [Non-text portions of this message have been removed] > Yahoo! Groups Sponsor > ADVERTISEMENT > -------------------------------------------------------------------------- ------ > Yahoo! Groups Links > > a.. To |