Other Parts Discussed in Thread: HALCOGEN
Hello Team,
I'm writing code to test the functionality of RAM ECC by injecting 1-bit and 2-bit errors. Also attempting to trigger the ESM low interrupt when an SRAM single bit error occurs.
Kindly let me know if the below mentioned steps are correct or is there any thing missing .These are the steps I have followed ->
-
Enable ECC detection, Enable single-bit error status capture, and ESM notification and ECC memory writes are enabled using RAMCTRL
RAMCTRL = ((0xA << 0) | (0x1<<4) | (0x1 << 8));
-
Write to memory -> (*(volatile uint32 *)(0x08000000 )) = 0x8421842184218421;
-
Insert 1 bit ECC error by flip one bit
uint32 ecc1 = *(volatile uint32 *)(0x08400000U) ^ 0x01 ; -
Read the corrupted data to generate single bit error
eccram_read1 = (*(volatile uint32 *)(0x08000000 )); -
Check the ESM flag Q: is theer any extra steps to be handled to check the esm error ?
/* Include Files */ #include "HL_sys_common.h" /* USER CODE BEGIN (1) */ #include "HL_reg_l2ramw.h" #include <stdio.h> /* USER CODE END */ /** @fn void main(void) * @brief Application main function * @note This function is empty by default. * * This function is called after startup. * The user can use this function to implement the application. */ /* USER CODE BEGIN (2) */ void checkSinglebitECC(void); void checkDoublebitECC(void); /* USER CODE END */ int main(void) { /* USER CODE BEGIN (3) */ checkSinglebitECC(); /* function called to inject and check single bit error mechanism*/ checkDoublebitECC(); /* function called to inject and check Double bit error mechanism*/ /* USER CODE END */ return 0; } /* USER CODE BEGIN (4) */ void checkSinglebitECC(void) { volatile uint64 eccram_read1 = 0U; /* variable to hold the corrupted data to generate single bit error */ /* Enable ECC detection. * Enable single bit error status capture and ESM notification. * ECC memory writes are enabled. */ l2ramwREG->RAMCTRL = ((0xA << 0) | (0x1<<4) | (0x1 << 8)); (*(volatile uint32 *)(0x08000000 )) = 0x8421842184218421; /* Force a single bit error */ uint32 ecc1 = *(volatile uint32 *)(0x08400000) ^ 0x01 ; /* Read the corrupted data to generate single bit error */ eccram_read1 = (*(volatile uint32 *)(0x08000000 )); //if((l2ramwREG->RAMERRSTATUS & 0x280000u) == 0x280000u) /* Check for error status } /* USER CODE END */
After doing these steps I checked the memory browser. I'm not able to find the update with the mentioned location.i also tried to to fill memory from the memory browser.
- What is the issue here?
- What are the configurations to be done to check in the memory browser?
- And how can I verify the error injection is successful?
Kindly revert at the earliest possible