cancel
Showing results for 
Search instead for 
Did you mean: 

SRAM ECC Check problems

MMali.10
Associate

I am having trouble with SRAM ECC check on an H7 MCU.

When i enable the registries the system trigger contiuouslly the ISR for a detected error and the status flags/registries are empty.

Also initializing the SRAM at startup dosen't solve the problem.

This is the piece of code that enable the check:

NVIC_DisableIRQ(ECC_IRQn);
RAMECC1->IER &= ~(RAMECC_IER_GIE | RAMECC_IER_GECCSEIE | RAMECC_IER_GECCDEIE | RAMECC_IER_GECCDEBWIE);
RAMECC1_Monitor1->CR &= ~(RAMECC_CR_ECCSEIE | RAMECC_CR_ECCDEIE | RAMECC_CR_ECCDEBWIE);
RAMECC1_Monitor1->SR &= ~(RAMECC_SR_SEDCF | RAMECC_SR_DEDF | RAMECC_SR_DEBWDF);
	
RAMECC1_Monitor1->CR |= RAMECC_CR_ECCDEBWIE | RAMECC_CR_ECCDEIE;
// RAMECC interrupt enable register (RAMECC_IER) on UNIT1 (D1 Domain)
RAMECC1->IER |= RAMECC_IER_GECCDEBWIE | RAMECC_IER_GECCDEIE;
// Enable Int
NVIC_SetPriority(ECC_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(), 5, 0));
NVIC_EnableIRQ(ECC_IRQn);
RAMECC1->IER |= RAMECC_IER_GIE;
RAMECC1_Monitor1->CR |= RAMECC_CR_ECCELEN;

After this code the system start to call continuously the ISR.

I read the RM0399 manual, the AN5342 and also the HAL example in this community, none of them solved the issue.

May someone help me?

Good work

2 REPLIES 2
FBL
ST Employee

Hello @MMali.10,

Could you please provide more details about the issue? Is it before during initialization? a screenshot of RAMECC registers would be of great help.

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

KevinG
Associate II

Did you get anywhere with this? I am seeing that if bits 0, 1 or 2 in RAMECC_IER are set (as the documentation suggests that they should be) then no values are returned in RAMECC_MxFAR, RAMECC_MxFDRL, RAMECC_x1FDRH or RAMECC_MxFECR.

Working:

0x52009000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0000002C 00000001 ................................,.......
0x52009028 00007488 516434BB 7EFC8B96 00000035 00000000 00000000 00000000 00000003 00000000 00000000 .t..»4dQ..ü~5...........................

Not working:

0x52009000 0000000F 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0000002C 00000000 ................................,.......
0x52009028 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000003 00000000 00000000 ........................................