Hi Radek,
I have integrated the sample code provided in S12ZVC192-RAM_ECC-CW106 to test double bit RAM ECC errors.
However, I am not able to successfully test the functionality.
Looks like ECCDCMD register is not being written.
The step which says "rawData should read 0x5AA5" actually reads 0x5AA0.
Any ideas on what I could be missing?

#include "mcuECC.h"
#include "mm9z1j638/mm9z1j638.h"
// variables for test
volatile unsigned int test_field @ 0x2800 = 0x0000;
volatile unsigned int resultData, resultECC, rawData, rawECC = 0;
void SRAMSingleBitECCInterruptEnable(void)
{
// Single bit MCU SRAM ECC error interrupt enable
ECCIE_SBEEIE = 1;
}
void testSRAMDoubleBitECCError(void)
{
test_field = 0x5AA5;
ECCDPTRH = 0x00;
ECCDPTRM = 0x28;
ECCDPTRL = 0x00;
//generating double bit ECC error by Debug pointer
ECCDD = 0x5AA0; //write data value with single bit ECC error
ECCDE = 0x39; //write incorrect ECC value
ECCDCMD = 0x82; //write to ECCDPTR address and disable Read Repair Function
ECCDCMD = 0x81; //read from ECCDPTR address with disabled Read Repair Function
rawData = ECCDD; //read data value at address 0x3000. It should be 0x5AA5
rawECC = ECCDE; //read ECC value at address 0x3000. It should be 0x39
resultData=test_field; //The reading will set ECC error flag and trigger ECC interrupt.
asm NOP; //just for debugging purpose - the step here will cause a jump to interrupt routine
}