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

Question about my interrupt handler

I have an interrupt handler where I save several strings of data into RAM. Using strcpy or strncpy works just fine when I had less than 64K RAM on my board.

We have moved to a system that has 128K RAM so I have had to write a subroutine that does the work to figure out which XDATA bank to write the data. (We are using P1.6 as the A16 address line.) The subroutine works just fine in all of the places I use it within my code except from within the interrupt handler.

Ideas? Is calling subroutines within an interrupt handler somehow forbidden? Do I have to use some directive to get this to work? Any and all suggestions welcome!

Parents
  • "When this code runs outside of the interrupt handler the bufaddr is correct but when called from the interrupt handler it is calculated wrong"

    are you using the same routine inside and outside the interrupt handler, That's a nono unless you have spent days making sure the routine is absolutotally reentrant.

    Erik

Reply
  • "When this code runs outside of the interrupt handler the bufaddr is correct but when called from the interrupt handler it is calculated wrong"

    are you using the same routine inside and outside the interrupt handler, That's a nono unless you have spent days making sure the routine is absolutotally reentrant.

    Erik

Children