Unable to erase external NOR flash memory while read, write works.
I am using STM32L496ZG to interface ISSI IS29GL064-70TLET nor flash by using HAL library. I used CUBE MX to generate the code and running code on Keil compiler. I am able to detect device ID, write and read block. But unable to erase data. I have used example code provided in application note AN4761.
Erase code snippet is below:
WRITE_READ_ADDR 0x8000
NOR_BANK_ADDR 0x64000000
HAL_NOR_ReturnToReadMode(&hnor1);
/* Erase the NOR memory block to write on */
HAL_NOR_Erase_Block(&hnor1, WRITE_READ_ADDR, NOR_BANK_ADDR);
/* Return the NOR memory status */
if(HAL_NOR_GetStatus(&hnor1, NOR_BANK_ADDR, NOR_TIMEOUT_VALUE) !=
HAL_NOR_STATUS_SUCCESS)
{
/* Erase Error */
HAL_UART_Transmit(&huart2, (uint8_t *) "Erase error" , 12, 100);
return NOR_STATUS_ERASE_ERROR;
}
The status returns erase success. But the bits are still the same, they don't turn to ones at all.
Can any one please help me out on this?
