Thank you Charlie and Jerry! My test routine now works fine. It was sooo simple -- just the two NOPs after the FRTID. I do remember seeing the note about the NOPs but forgot about them in the heat of the moment. Rob ----- Original Message ----- From: "Charlie W" <> To: "Johnson, Jerry" <>; "'robatacp'" <>; <> Sent: Wednesday, January 14, 2004 1:06 PM Subject: RE: [motoroladsp] Help with fast interrupt: CW/PE on 56f8232 > You must use assembly language in Fast Interrupt. > CodeWarrior C Complier does not support FRTID > instruction. Other word, it dosen't support fast > interrupt in C. Please see attach project which based > on 8323. > > Charlie > --- "Johnson, Jerry" <> wrote: > > I think there might be an explanation since the > > FRTID is a delayed > > instruction, so needs to have 2 extra nop's or other > > intended instructions > > after it!!! I have not found any support in the "C" > > pragmas for "Fast > > Interrupt" support, implying the use of the FRTID > > instruction at the end. > > Sounds like a Pragma would be nice. > > > > Jerry. > > > > > -----Original Message----- > > > From: robatacp [mailto:] > > > Sent: Wednesday, January 14, 2004 10:48 AM > > > To: > > > Subject: [motoroladsp] Help with fast interrupt: > > CW/PE on 56f8232 > > > > > > > > > Hi, > > > I'm using Processor Expert under CW for a 56F8323 > > project and could > > > use some help implementing the fast interrupt > > capability of the > > > 56800E processor. > > > > > > I'm trying to convert a working high priority > > interrupt to the Fast > > > Interrupt mechanism to lower processing overhead > > but have a problem > > > getting the ISR correctly structured. On changing > > from priority 2 to > > > fast interrupt, PE seems to set up correctly for > > the fastInterrupt > > > initializing FIVAL0 FIVALH0 FIM0 and the > > appropriate IPR correctly as > > > well as the JMP in the vector table, but the > > interrupt fails and the > > > program goes off into deep space. > > > > > > Looking at the assembly code generated by the ISR > > I noticed that it > > > uses an RTI instruction instead of the required > > FRTID for fast > > > interrupts. > > > > > > The interrupt pragma does not seem to contain > > arguments to support > > > the fast interrupt. > > > Are there appropriate arguments? > > > Is it documented and where? It was not part of > > the online > > > documentation that came with CW. > > > > > > As a workaround, and using assembler code I made a > > very simple ISR to > > > my timer interupt (Priority 2) that just clears > > the flag and returns > > > with an RTI like this: > > > > > > bfclr #flag,register > > > rti > > > > > > and this works fine as a priority 2 interrupt. > > > > > > > > > To test the fast interrupt I again used PE to make > > it a > > > FastInterrupt0 and changed my assembly ISR using > > FRTID instead of > > > RTI. I put some NOPs at the top of the ISR since > > there are > > > restrictions on what can occur in the first > > several instructions of a > > > fast interrupt. I get into the routine OK but get > > go off into space > > > on executing the FRTID. > > > > > > nop > > > nop // just in case... > > > nop > > > nop > > > bfclr #flag,register > > > frtid > > > > > > So there are two questions here. How do you > > structure C to handle the > > > fast interrupt syntax? And what is an appropriate > > setup and ISR for a > > > fast interrupt? Any examples? > > > > > > Thanks in advance... > > > Rob > > > > > > > > > > > > _____________________________________ > > > Note: If you do a simple "reply" with your email > > client, only > > > the author of this message will receive your > > answer. You > > > need to do a "reply all" if you want your answer > > to be > > > distributed to the entire group. > > > > > > _____________________________________ > > > About this discussion group: > > > > > > To Join: > > > > > > To Post: > > > > > > To Leave: > > > > > > Archives: > > http://www.yahoogroups.com/group/motoroladsp > > > > > > More Groups: http://www.dsprelated.com/groups.php3 > > > > > > > > > Yahoo! Groups Links > > > > > > To For more information visit > > http://www.messagelabs.com > > > > > > ______________________________________________________________ > > > __________ > > > > > > > > > > ________________________________________________________________________ > > This email has been scanned for all viruses by the > > MessageLabs SkyScan > > service. For more information visit > > http://www.messagelabs.com > > > ________________________________________________________________________ > __________________________________ > |