SRAM memory is deleted when a software or watchdog reset occurs? | Cypress Semiconductor
SRAM memory is deleted when a software or watchdog reset occurs?
Hello. Is SRAM memory deleted if software or watchdog reset occurs? I know that RAM memory is volatyle, and i am using PSoC5.
Here is the code i would use for testing if SRAM is deleted or not if reset occurs. I am wondering if it is ok.
unsigned char *P = (unsigned char*)0x20000000;
unsigned char cnt = 0;
if(*P != 0xAA)
*P = 0xAA;
Pin1_Write(1); //led1 is on if SRAM is erased
Pin2_Write(1); //led2 is on if SRAM is not erased
if(cnt == 16)
CY_SET_REG8(RESET_CR2, 1); //software reset