EEP Partitioning causing exception or Hardfault during Init after flashing

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

EEP Partitioning causing exception or Hardfault during Init after flashing

739 Views
SAnjal
Contributor I

I have developed a custom SW for S32K118, in which I have to store Data to NVM, for this I have used FlexRAM. When I flashed App on the MCU and run, I observe that MCU stuck at exception handler. After debugging the SW I have seen that, while FlexRAM partition is in progress its going to exception  from the condition "while(0 == ((FTFC->FSTAT & FTFC_FSTAT_CCIF_MASK) >> FTFC_FSTAT_CCIF_SHIFT))" is being checked,

Note: also the watchdog is enabled before the partitioning with timeout of 32mSec and refresh is performed every 10mSec. The FlexRAM activity is performed in periodic task of 10mSec for partitioning/Reading/Writing. Also MCU reset is performed after EEP partition as per the requirement.

Labels (1)
0 Kudos
Reply
3 Replies

695 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @SAnjal 

The partition command must be executed from RAM memory. You need to ensure that the flash is not accessed during partitioning (disabled interrupts, callback function in RAM...):

lukaszadrapa_0-1717775002465.png

 And be aware of other restrictions related to flash, emulated eeprom and CSEc:

lukaszadrapa_1-1717775067559.png 

Regards,

Lukas

 

0 Kudos
Reply

618 Views
SAnjal
Contributor I

We have take care to run Partitioning command from RAM but, still facing this issue. As per observation,

PC is not jumping to RAM to execute the Program Partitioning command.

Note: As per current implementation we have optimized our code to level 01, does this might be creating the issue. If yes, then what care should we take for FlexRAM partitioning.

0 Kudos
Reply

589 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

How do you force the function to RAM?

0 Kudos
Reply