S32K144 FLASH application problem

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

S32K144 FLASH application problem

1,947 Views
liuweiliang
Contributor II

MCU model number: S32K144
Downloader: J-LINK
Description of the problem: After the PFlash cache is closed, there is no problem with single-step debugging. The online DEBUG fails to run at full speed, as shown in the following figure:
Note: When running offline, check whether it is running through the indicator in the main function. The indicator does not respond, indicating that it has not entered the main loop.

deadbef5:   Failed to execute MI command:

          -data-disassemble -s 3735928565 -e 3735928721 -- 3

          Error message from debugger back end:

          Cannot access memory at address 0xdeadbef4

aaaaaaaaaaa.png

Configuration information:
1. Set the clock to RUN mode before configuring PFlash (normally working in HSRUN, PFlash cannot operate under high speed).
2. Close the PFlash cache and prefetch:
MSCM->OCMDR[0u] |= MSCM_OCMDR_OCM1(0xFu);
3. Initialize PFlash; write data to PFlash.
4. Enable PFlash cache and prefetch.
5, restore the working mode to HSRUN mode (112M)

Labels (1)
0 Kudos
3 Replies

1,094 Views
ssyyw
Contributor I

I also meet the problem just like you, so, are u solve it? thank u! waiting for your reply!

0 Kudos

1,638 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello,

Please refer to the OCM1 description:

pastedImage_2.png

The below line should be executed from RAM to avoid these undesired results.

MSCM->OCMDR[0u] |= MSCM_OCMDR_OCM1(0xFu);

Regards,

Daniel

0 Kudos

1,638 Views
jochengerster
NXP Employee
NXP Employee

HI Daniel,

are there other scenarios possible, beside code execution from flash which would keep the flash controller busy / causing a problem?

Like DMA, EEE, cSEC accessing the flash?

thanks

best regards

Jochen

0 Kudos