This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problem with using Routines in Main program file in the Interrupt service routine

I have a routine in my main program file for displaying float values on terminal program. When i try to use the same routine in my Interrupt service routine(ISR), it give an warning stating "Reference made to unresolved function". Secondly i also wanted to know how can i use a global variable in the ISR as its not possible to pass a parameter from any routine to the ISR.

Parents
  • When i try to use the same routine in my Interrupt service routine(ISR), it give an warning stating "Reference made to unresolved function".

    That's two bad things in one sentence. First, you shouln't be doing such excessively hard work as formatting an FP number in an ISR, ever. Second, that's not a warning, it's an error, and it says you didn't actually manage to call the same routine---probably just a typo in the call to it, but it's impossible for anyone out here to be sure, since you didn't show any actual code.

    Secondly i also wanted to know how can i use a global variable in the ISR

    Just do it. But be sure not to use a multi-byte variable, or if you do, read up on multi-threaded programming techniques like "semaphores".

Reply
  • When i try to use the same routine in my Interrupt service routine(ISR), it give an warning stating "Reference made to unresolved function".

    That's two bad things in one sentence. First, you shouln't be doing such excessively hard work as formatting an FP number in an ISR, ever. Second, that's not a warning, it's an error, and it says you didn't actually manage to call the same routine---probably just a typo in the call to it, but it's impossible for anyone out here to be sure, since you didn't show any actual code.

    Secondly i also wanted to know how can i use a global variable in the ISR

    Just do it. But be sure not to use a multi-byte variable, or if you do, read up on multi-threaded programming techniques like "semaphores".

Children