AnsweredAssumed Answered

S32K144 FLASH application problem

Question asked by liu wei on Apr 15, 2019
Latest reply on Apr 15, 2019 by Daniel Martynek

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

 

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)

Outcomes