Hi All,
My customer want us to prove DDR3 ECC function is working on AM572x, is there any way to verify ECC by software? Thank you.
Regards,
Allen
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi All,
My customer want us to prove DDR3 ECC function is working on AM572x, is there any way to verify ECC by software? Thank you.
Regards,
Allen
Allen35065 said:Thanks. Brad. But how did you know ECC fucntion was correct in design and verification?
I don't see this any differently than anything else in the chip. The design team can simulate all the logic to make sure it is correct. I'm not a designer so I don't know all their methods.
If you write non quanta sized data you will get an error.
Correct. You must write to the entire space so that you have valid ECC data. Otherwise a read would result in an error.
Are you sure the corresponding memory range is non-cacheable as defined by your MMU page table? If the cache is operating on the corresponding memory range then it will always be accessing full cache lines.
Allen35065 said://Enable ECC with in RANGE 1&2
hEmif->regs->ECC_CTRL_REG = 0xC0000003;
You combined several steps into this one operation. I can't say for sure that will break things, but given that you're having some issues I recommend following the initialization instructions precisely.
Allen35065 said:*(unsigned char*)(0x80000001) = 0x55;
That should be sufficient to trigger an error. So are you not seeing EMIF_SYSTEM_OCP_INTERRUPT_STATUS[3] WR_ECC_ERR_SYS set to one?
Brad,
I don't know my silicon version as i used VAYU EVM. The P/N on chip is OMAP X5777AXGABC.
And i tried to use 0x00000000 address but i found i couldn't read and write DDR3. When using 0x80000000 I can access (write and readback) DDR3 data correctly.
From TRM, CTRL_WKUP_EMIF1_SDRAM_CONFIG_EXT_1 register is used for EMIF1_PHY_REG_READ_DATA_EYE_LVL.
Regards,
Allen
Allen35065 said:And i tried to use 0x00000000 address but i found i couldn't read and write DDR3. When using 0x80000000 I can access (write and readback) DDR3 data correctly.
The correct value is 0x00000000. If you can't read/write DDR3, that's likely due to the fact that there is something else wrong with your ECC setup. Programming this register incorrectly simply tricks the EMIF into thinking that you're not trying to write to the protected region (i.e. it does not attempt to utilize the ECC lanes).
My suspicion would be that this relates to leveling. Are you doing hardware leveling or software leveling? By the way, is this a gel file you're using or C code (such as u-boot, etc.)?
Allen35065 said:Thank you. You are right. After putting ECC init code before leveling i can get error now.
Ok, I think we're getting there. Your ECC initialization code looks to be correct with the latest change. However, there is a problem related to leveling. Leveling should be done prior to ECC configuration. So If leveling is breaking ECC, then I think something is wrong with your leveling. Are you using software leveling or hardware leveling?
Hi Siva,
I completed the ECC test according to your comments. I did see the 1-bit error was inserted and corrected. Thank you.
Regards,
Allen
Hi Siva,
After ECC function verified, i'm going to generate an interrupt from ECC event. Based on ECC test case, i enabled EMIF event in EMIF_SYSTEM_OCP_INTERRUPT_ENABLE_SET. But i tried to issue 1-bit error by
- Turn off the ECC (This again can be done by using the ECC_CTRL_REG register)
- Introduce a 1-bit error by writing into the previous filled memory locations
- Enable ECC back (Same as 1st step)
then i checked ECC status registers,
0x4C0000A4 EMIF1_EMIF_SYSTEM_OCP_INTERRUPT_RAW_STATUS is 0x0
0x4C0000B4 EMIF_SYSTEM_OCP_INTERRUPT_ENABLE_SET 0x39
0x4C000130 EMIF1_EMIF_1B_ECC_ERR_CNT is 0x1
it looked like ECC error was issued but no event was generated.
My question is Can we generate EMIF ECC event by this way? if yes, how to set these registers?
Thank you.
Regards,
Allen
Allen35065 said:i enabled EMIF event in EMIF_SYSTEM_OCP_INTERRUPT_ENABLE_SET. But i tried to issue 1-bit error by
- Turn off the ECC (This again can be done by using the ECC_CTRL_REG register)
- Introduce a 1-bit error by writing into the previous filled memory locations
- Enable ECC back (Same as 1st step)
then i checked ECC status registers,
Did you read the location with the 1-bit error in it?
Allen35065 said:0x4C0000A4 EMIF1_EMIF_SYSTEM_OCP_INTERRUPT_RAW_STATUS is 0x0
0x4C0000B4 EMIF_SYSTEM_OCP_INTERRUPT_ENABLE_SET 0x39
0x4C000130 EMIF1_EMIF_1B_ECC_ERR_CNT is 0x1
What was the ERR_CNT value before performing the test? Had you cleared out the error count from the previous test?
Yes. I cleared status before enable EMIF ECC event as below.
*(unsigned int *)(0x4C000130) = *(unsigned int *)(0x4C000130); //clear 1B ECC counter
*(unsigned int *)(0x4C000138) = 0xFFFFFFFF; //clear 1B ECC distrubution
*(unsigned int *)(0x4C000140) = 0x1; //clear 2B ECC ERROR address
*(unsigned int *)(0x4C0000AC) |= 0x7 << 3 ;//clear error status
I did check 1B ECC counter, it was 0x0. After disable, modify and enable ECC, 1B ECC counter(0x4C000130) was 0x1 and 1B ECC distrubution was also correct at the bit just as i modified in the data. EMIF_SYSTEM_OCP_INTERRUPT_ENABLE_SET was 0x39. But there was no bit set in EMIF interrupt raw status and status register.