I am using the library C:\Freescale\KM256SWDRV_R4_1_5.
1.The writing to flash is OK for the fellow code.
static UBYTE SCI_data_buffer[128];
FTFA_EraseSector ((const void *)0x3E800U);
FTFA_WriteArray ((const void *)0x3E800U,&SCI_data_buffer[0],128U);
2.The writing to flash is failed for the fellow code. The program jumps to hardfault_isr.
static UBYTE SCI_data_buffer[128];
FTFA_EraseSector ((const void *)0x3E800U);
FTFA_WriteArray ((const void *)0x3E800U,&SCI_data_buffer[7],128U);
What is the reason?
Hello Robin,
function requires source and destination addresses of input arguments to be 4-byte aligned. The following code should execute without problems:
FTFA_WriteArray ((const void *)0x3E800U,&SCI_data_buffer[8],128U);
Kind regards,
Martin M.