The question of the flash writing in the KM34.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

The question of the flash writing in the KM34.

407 Views
小勇邹
Contributor II

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?

Labels (1)
0 Kudos
1 Reply

296 Views
MarMi
NXP Employee
NXP Employee

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.

0 Kudos