Forum Discussion
My code in C:
int main()
{
IOWR(INTEL_GENERIC_SERIAL_FLASH_INTERFACE_TOP_0_AVL_CSR_BASE,0x7,0x00000006); --Write enable
IOWR(INTEL_GENERIC_SERIAL_FLASH_INTERFACE_TOP_0_AVL_CSR_BASE,0x8,0x00000001); --Write enable
IOWR(INTEL_GENERIC_SERIAL_FLASH_INTERFACE_TOP_0_AVL_CSR_BASE,0xA,1); --Write enable
IOWR(INTEL_GENERIC_SERIAL_FLASH_INTERFACE_TOP_0_AVL_CSR_BASE,0x7,0x000004DC); --Erase sector
IOWR(INTEL_GENERIC_SERIAL_FLASH_INTERFACE_TOP_0_AVL_CSR_BASE,0x9,0x00010000); --Erase sector
IOWR(INTEL_GENERIC_SERIAL_FLASH_INTERFACE_TOP_0_AVL_CSR_BASE,0x8,0x00000001); --Erase sector
}
Hi @Gyud0 ,
It's not a GSFI (Generic Serial Flash Interface) IP driver issue. The GSFI drivers are working fine. Please check Micron MT25QL512Mb flash memory access code because before erasing the sector, you have to disable device lock protection, write command passing, and some other commands also have to execute. In the Micron MT25QL512Mb datasheet, all the details are available. I am giving some reference example code links for the Micron MT25QL512Mb.
link:
https://github.com/STMicroelectronics/stm32-mt25ql512abb
thanks,