Writing to flash generates a HardFault
Hi,
I'm busy with my own BootLoader. I can erase the flash, required to store the program. But writing to the flash causes a HardFault. (I also write to flash in my application to store the configuration. That seems to work, so (normally) I can write to the flash without any problems).
My routine looks as follows (msg.Data is the received information from my PC. The contents look fine):
HAL_FLASH_Unlock();
uint64_t* pData = (uint64_t*)&msg.Data;
while (m_CurrentAddress < tempEndAddress)
{
HAL_FLASH_Program(FLASH_TYPEPROGRAM_DOUBLEWORD, m_CurrentAddress, *pData);
m_CurrentAddress += 8;
pData++;
}
HAL_FLASH_Lock();The debugger shows this information:


I do not know how to (further) debug this information.
Thanks in advance.
Greetings,
ErX
