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

Garbage in RAM data

Dear All, I have a problem of currption data variables stored in RAM. This currption occurs anytime when all my interrupts are working. I am using Cygnal controller C8051F005 with all its interrupts are active. My code is mixture of Assembly + C lang. and my ROM is also on the verge of full.What are the reasons for corruption in RAM data?

Thanks in advance.
Mehul

Parents
  • guesses
    1) missing register save in an ISR
    2) missing SFR (notably PSW) save in an ISR
    3) disabling - enabling instead of saving, disabling, restoring interrupt enables
    4) Atomicity errors
    5) missing ISR for an enabled interrupt
    6) a RET instead of RETI
    7) subroutines shared between main and ISR
    8) .... incomplete list, but the mmost likely

    Erik

Reply
  • guesses
    1) missing register save in an ISR
    2) missing SFR (notably PSW) save in an ISR
    3) disabling - enabling instead of saving, disabling, restoring interrupt enables
    4) Atomicity errors
    5) missing ISR for an enabled interrupt
    6) a RET instead of RETI
    7) subroutines shared between main and ISR
    8) .... incomplete list, but the mmost likely

    Erik

Children
No data