I'm working with CCS 5.4 and the SafeTi-HSK (using the TMS570).
I'd like to generate single ecc errors in RAM and Flash, generate an ESM group 1 notification, and then run some of my code when the error occurs.
The flow I am following is this (for Flash):
- disable flash ECC (uses Halcogen generated _coreDisableFlashEcc_)
- flip one bit from memory address (function _genSingEccErr_ below)
- enable flash ECC (uses Halcogen generated _coreEnableFlashEcc_)
- read from the memory address that was modified (function _readMemForEccCheck_ below)
However, instead of generating an ESM group 1 channel 6 error as I would expect, I go into the vimParityErrorHandler with error channel 56.
Is there are simple, straightforward way to cause single ecc errors in RAM and Flash (and double errors as well) which can cause a ESM group 1 notification and run user code?
Thanks,
David
;------------------------------------------------------------------------------- ; Generate single ECC error ; Requirements: .def _genSingEccErr_ .asmfunc _genSingEccErr_ cps #13 ; Switch to supervisory mode mov r0, #0x00180000 ; Load address to a scratch register ldr r1, [r0] ; read in a memory location from location eor r1, r1, #1 ; invert bit 0 str r1, [r0]; store value back into address .endasmfunc ;------------------------------------------------------------------------------- ; Read memory for ecc check ; Requirements: .def _readMemForEccCheck_ .asmfunc _readMemForEccCheck_ cps #13 ; Switch to supervisory mode mov r0, #0x00180000 ; Load address to a scratch register ldr r1, [r0] ; read in memory location .endasmfunc