Hard Fault while Fls_Write runs in s32k314

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

Hard Fault while Fls_Write runs in s32k314

278 Views
EddiePark
Contributor II

Hi.

I write any data using Fls_Write in S32K314.

But at this time, hard fault happens like the attached file.

Could you please let me know what should I do to resolve this issue?

BRs.

Eddie Park

 

0 Kudos
Reply
3 Replies

248 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @EddiePark 

ould you provide more information about the configurations and implementation?

 

BR, VaneB

0 Kudos
Reply

242 Views
EddiePark
Contributor II

Hi VaneB.

I want to write hse enable flag to 0x1b000000.

below is code for this.

and the attached file is hex and elf file for this.

I download the hex file to mcu and Power off and Power on.

The below code runs after power on. But hard fault happens while Fls_Write runs.

I provided same hex file to two customer. The customer use s32k314.

but one customer use this hex file without issue. Hard fault happens to the other customer   

Fls_AddressType TargetAddress = LOGICAL_START_ADDR + (INTERNAL_SECTOR_SIZE * 4) ;
Std_ReturnType RetVal = E_NOT_OK;
uint32 offset = 0x00u;
 
/* Write to internal FLS */
RetVal = Fls_Write(TargetAddress + offset, (const uint8 * )&HseFWEnableFlagValue[0], 8); 
/* Check return status */
CDDAssert(E_OK == RetVal);
if(E_OK != RetVal){
goto exit;
}else{
}
/* Perform the job */
while (MEMIF_IDLE != Fls_GetStatus())
{
Fls_MainFunction();
}
/* Check job result */
CDDAssert(MEMIF_JOB_OK == Fls_GetJobResult());
if(MEMIF_JOB_OK == Fls_GetJobResult()){
RetVal = E_OK;
}else{
RetVal = E_NOT_OK;
}
0 Kudos
Reply

185 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @EddiePark 

Refer to the community thread [S32K3] Restrict the debug access with a password when HSE is not used. This explains how to write to the UTEST sector using the C40_Ip functions.
The address is diffreren from the HSE Firmware Usage feature flag, but it may be a good reference for you.
0 Kudos
Reply