We are using R01AN0749EG0201- VDE Certified IEC60730 60335 Self Test Library in our RL78G13.
We are now implementing the march_x to check all the RAM in several steps.
After checking the 0xFFEA1U a reset is generated due to a RAM parity error.
Implemented source code:
#define RAM_TEST_START (0xFF788U)
#define RAM_TEST_END (0xFFEDFU)
#pragma dataseg=RAM_TEST_DATA
/* Variable definitions used for RAM Test modules */
__no_init uint8_t g_data_backup;
__no_init uint8_t *g_pMX_StAdr;
__no_init uint16_t g_RAM_MarchX_lgth;
#pragma dataseg=default
g_RAM_MarchX_lgth = 1U; /* Set RAM end address (length + 1) */
if ((g_pMX_StAdr > (uint8_t *) RAM_TEST_END) ||
(g_pMX_StAdr < (uint8_t *)RAM_TEST_START))
{
g_pMX_StAdr = (uint8_t *)&RAM_TEST_START;
}
else
/* Execute March X test */
__disable_interrupt();
/* Save the content of the location to be tested */
g_data_backup = *g_pMX_StAdr;
g_resultBool = stl_RL78_march_x(g_RAM_MarchX_lgth, g_pMX_StAdr);
/* Restore the content of the tested location */
*g_pMX_StAdr = g_data_backup;
__enable_interrupt();
g_pMX_StAdr ++;
Thank you for your help.
Best regards,