1.4.1 SRAM Read-Back

Following a device power-up sequence, there is a possibility that some SRAM locations will not return the expected written value but will read back ‘00’ instead.

Work around

None. The device can only recover by power cycling.

This erroneous condition can be detected by running the following code that writes nonzero values to SRAM and then verifies that the returned read values are not ‘00’. If a returned value is ‘00’, the application code has to be put into a safe state until a POR event occurs. This code has to be executed immediately after power-up. If the test passes, the device operation will be normal.
// SRAM test
 
FSR0 = 0xcff;        // Write data into RAM address for devices up to 2K RAM
INDF0 = 0x55;
PROD = INDF0;        // Read back data
if (PROD == 0){
    SAFE_STATE();    // RAM incorrectly read, suspend operation and go to Safe state
} 

//For devices with more than 2K of SRAM, add the following code
FSR0 = 0x14ff;       // Write data into RAM
INDF0 = 0x55;
PROD = INDF0;        // Read back data
if (PROD == 0){
    SAFE_STATE();    // RAM incorrectly read, suspend operation and go to Safe state
}

//For devices with more than 4K of SRAM, add the following code
FSR0 = 0x24ff;       // Write data into RAM
INDF0 = 0x55;
PROD = INDF0;        // Read back data
if (PROD == 0){
    SAFE_STATE();    // RAM incorrectly read, suspend operation and go to Safe state
}

Affected Silicon Revisions

B0 B2B3F1G1
X