Tool/software:
Hi,
I try to erase 8 bytes of flash at a time, but the result is that one sector (1024 bytes) is erased.
Is there anything wrong with the code?
bool FLS_EraseOneWord(const uint32_t addr)
{
bool flashStat;
DL_FlashCTL_executeClearStatus(FLASHCTL);
DL_FlashCTL_unprotectSector(FLASHCTL, addr, DL_FLASHCTL_REGION_SELECT_MAIN);
DL_FlashCTL_eraseMemory(FLASHCTL, addr, DL_FLASHCTL_COMMAND_SIZE_ONE_WORD);
flashStat = DL_FlashCTL_waitForCmdDone(FLASHCTL);
return flashStat;
}
