Re: Installing ISR for Interrupt 5
Bryan Armstrong <bryan.armstrong-6tN4nzCoH/[email protected]>
| Newsgroups | gmane.comp.hardware.microcontrollers.tini |
|---|---|
| Message-ID | <[email protected]> |
Chris Musial wrote: > I'm trying to install a handler for Interrupt 5 and am ending up hanging my > machine when the interrupt gets generated. I'm also installing a handler for > Interrupt 1 and this 1 is working OK, so I'm pretty sure I have the overall flow > right. I think my problem is that Interrupt 5 is shared by the 1-wire master > bus and I can't find the documentation for turning off those interrupts. The > documentation says I need to use OWMAD and OWMDR to turn off the EOWMI bit, but > I can't find anywhere that tells me where that bit is, or if there's anything > else I need to do. I did infer that the control register is used to turn it > off, but there must be something else. Here's my interrupt installation code: Look in the DS80C400 Datasheet. The DS80C400 user guide does not have the complete info on the 1-Wire master. EOWMI is defined as bit 7 of the control register. > The routine to install the interrupt returns success (it would return 4 if this > installation failed). Right now, the ISR is empty - just an IRET instruction, > but the board hangs as soon as the interrupt is generated. As I said, my > handler for interrupt 1 is working, but (a) - interrupt 5 is shared with > interrupts 2-4, and (b) it is multiplexed with the 1-wire bus. Is there > anything else I need to do when installing int 5? Make sure to clear EXIF.7 (IE5), the /INT5 flag bit, before you reti out of your ISR. I think the interrupt is continuously firing. BTW, the 1-Wire code in TINIOS does not use interrupts so your code is safe from 1-Wire interrupts. -- -- Bryan Armstrong bryan.armstrong-6tN4nzCoH/[email protected] _______________________________________________ TINI mailing list TINI-6tN4nzCoH/[email protected] To UNSUBSCRIBE, edit your profile, or see list archives: http://lists.dalsemi.com/mailman/listinfo/tini