From: Joel D. <jr...@pr...> - 2012-07-23 05:28:26
|
Hi there, I'm developing some code for a pic16f684, and I'm having a problem with the interrupt code the compiler is generating. If I manually edit the asm file and delete all of the code inserted in the isr to save and restore the state of the W, STATUS, PCL and FSR registers, and just leave my actual interrupt service code in, my code is working as expected, as I currently have a semaphore that gets checked in my main() loop that waits until the isr is complete. This of course isn't acceptable for my final code. When I leave the isr code that saves/restores the state, the processor appears to hang. Also, there appears to be some suspect code generated at the end of the isr to restore the W register. The save code is: MOVWF WSAVE but the restore code is: SWAPF WSAVE,F SWAPF WSAVE,W Shouldn't the restore code be: MOVF WSAVE, W This isn't the whole of the problem in the interrupt code though, as changing this doesn't resolve the hang issue. I'm running from the most current code base, revision 8053, on Fedora fc15.i686.PAE. Any help or pointers as to what I may be doing wrong would be appreciated. Thanks. Joel -- Joel Davidson Austin, TX jr...@pr... |