2018-03-19 05:15 AM
pEraseInit.TypeErase = TYPEERASE_SECTORS;
pEraseInit.Sector = 6;pEraseInit.NbSectors = 1pEraseInit.VoltageRange = VOLTAGE_RANGE;pc.printf('.');while(*(__IO uint16_t*)PAGE0_BASE_ADDRESS != 0xFFFF) { FlashStatus = HAL_FLASHEx_Erase(&pEraseInit, &SectorError); if (FlashStatus != HAL_OK) { return FlashStatus; } pc.printf('.'); pc.printf('.');}pc.printf('\r\n');I'm running the above code (simplified) as a part of an emulated eeprom on a nucleo-f746zg board. The eeprom sector (6 & 7) doesn't erase at all without the print statements. With the print statements it erases but sometimes after upto six iterations. I've tried disabling both caching and prefetching. With caching disabled it stops working completely.
I have tried changing the supply voltage parameter with no difference.I have tried using the driver from the standard peripherals library (f4) with similar results.
Any guidance you can give on this would be much appreciated.
Compiler GCC_ARM
#flash-sector2018-08-09 10:03 PM
Sorry, bumping old zombie unanswered questions off my feed