Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/13/10 05:17
Read: times


 
#177971 - Call a routine from an interrupt
Responding to: ???'s previous message
Maarten Brock said:

You CANNOT call ANY routine from an interrupt. You must ensure that the routine is reentrant or that it is called from that interrupt only.
Agreed, you can call any routine from an interrupt if it is called from that interrupt only. For instance, a response is required from a slave when the master asks it. Call the routine from the serial interrupt only.
All this can be avoided if the code is inserted in the ISR and you did not need a function to prove your point.
.I don't think so. The serial interrupt is the highest on the priority list, and that will screw up all interrupts such as timers and rotary encoders on external interrupts. The response can be quite long. It is far safer to call the routine and free the interrupts immediately in my opinion.
Calling a function that is not using the same bank will at best give a setback in performance if not fail.
I regularly use a separate reg bank for certain interrupt routines to avoid pushing an popping. Why not, surely that is what the USING keyword is for?
I don't know what an assembler page is. So I have no idea what you mean here.
Yes, English is not my home language, and I get the semantics wrong. Shall we say an assembler file? If you do inline assembler, your debugging is a pain, all code is shown in assembler. A separate file with only the RETI instruction prevents that.
Regards
Johan Smit


List of 17 messages in thread
TopicAuthorDate
Writing to SBUF in Serial Routine            01/01/70 00:00      
   Sure...            01/01/70 00:00      
   yes, but            01/01/70 00:00      
      TX inside serialint            01/01/70 00:00      
         Pardon??            01/01/70 00:00      
            Pardon accepted            01/01/70 00:00      
               Still a Missing Part of Scheme            01/01/70 00:00      
            Pardon            01/01/70 00:00      
               Will that work in 'C' ?            01/01/70 00:00      
                  Assembler if you want            01/01/70 00:00      
                     Why send_char?            01/01/70 00:00      
                        Why send_char            01/01/70 00:00      
                           You missed the point            01/01/70 00:00      
                              Call a routine from an interrupt            01/01/70 00:00      
                                 Still misunderstanding            01/01/70 00:00      
                                 misunderstandings            01/01/70 00:00      
      what happened to the OP?            01/01/70 00:00      

Back to Subject List