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

Validating Code Memory

Hi,
I'm validating if the codes in code memory is corrupted by calculating the check sum. So what is the method to access the last location where the code ends in code memory. How do I determine this location during run time. Please update me on this mail Id: akshayskumar@gmail.com

Parents
  • "As long as you're willing to accept a failure due to corruption of the validation code, it doesn't matter. Either the code executes correctly, and it detects the CRC error, or the validation code itself is corrupt, in which case it is highly unlikely to accidentally calculate the correct CRC."

    True.

    But if the validation code itself is corrupted, it most likely won't just do the validation incorrectly - it's behaviour will become entirely undefined!
    It could do anything - jump off to random locations, etc, etc.

    The point being, a checksum check alone (OP didn't even say CRC) is not a complete validation - you need to include other protections, like Watchdogs, etc.

Reply
  • "As long as you're willing to accept a failure due to corruption of the validation code, it doesn't matter. Either the code executes correctly, and it detects the CRC error, or the validation code itself is corrupt, in which case it is highly unlikely to accidentally calculate the correct CRC."

    True.

    But if the validation code itself is corrupted, it most likely won't just do the validation incorrectly - it's behaviour will become entirely undefined!
    It could do anything - jump off to random locations, etc, etc.

    The point being, a checksum check alone (OP didn't even say CRC) is not a complete validation - you need to include other protections, like Watchdogs, etc.

Children