Run Code on S32K148 FlexNVM

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

Run Code on S32K148 FlexNVM

191 Views
Kevin74
Contributor II

Hello NXP Expert:

 

now we have a big issue, that we want to run program code on FlexNVM of S32K148 MCU, the address of code is from 0x1000_0000 to 0x1003_FFFF.

 

after compiler and link, the function code has already correct located in FlexNVM, as follow iSystem Trace shows:

 

 

Kevin74_0-1763087388512.jpeg

 

then when i debug in step mode, so every time only excute one line code, it is OK, the code can run, but if start run mode, the code will suddenly chaos and reset the cpu.

 

the Clock configuration is PLL 80MHz, core 80MHz, Bus Clock 40MHz, Flash Clock 20MHz.

 

so how can fix this and let code run on FlexNVM?

 

Many thanks and Best Regards!

Kevin 

0 Kudos
Reply
1 Reply

158 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Kevin74

The screenshot you provided is too blurry, i can get nothing from your picture.

Please take a look at the AN12323 and AN12323SW, which provided detail usage about FLEXNVM

used as bootloader(but it's in bare-metal).

 

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2204809%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERun%20Code%20on%20S32K148%20FlexNVM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2204809%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20NXP%20Expert%3A%3C%2FP%3E%3CBR%20%2F%3E%3CP%3Enow%20we%20have%20a%20big%20issue%2C%20that%20we%20want%20to%20run%20program%20code%20on%20FlexNVM%20of%20S32K148%20MCU%2C%20the%20address%20of%20code%20is%20from%200x1000_0000%20to%200x1003_FFFF.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3Eafter%20compiler%20and%20link%2C%20the%20function%20code%20has%20already%20correct%20located%20in%20FlexNVM%2C%20as%20follow%20iSystem%20Trace%20shows%3A%3C%2FP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Kevin74_0-1763087388512.jpeg%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Kevin74_0-1763087388512.jpeg%22%20style%3D%22width%3A%20290px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F365598i85BCF41132405E23%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Kevin74_0-1763087388512.jpeg%22%20alt%3D%22Kevin74_0-1763087388512.jpeg%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3Ethen%20when%20i%20debug%20in%20step%20mode%2C%20so%20every%20time%20only%20excute%20one%20line%20code%2C%20it%20is%20OK%2C%20the%20code%20can%20run%2C%20but%20if%20start%20run%20mode%2C%20the%20code%20will%20suddenly%20chaos%20and%20reset%20the%20cpu.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3Ethe%20Clock%20configuration%20is%20PLL%2080MHz%2C%20core%2080MHz%2C%20Bus%20Clock%2040MHz%2C%20Flash%20Clock%2020MHz.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3Eso%20how%20can%20fix%20this%20and%20let%20code%20run%20on%20FlexNVM%3F%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EMany%20thanks%20and%20Best%20Regards!%3C%2FP%3E%3CP%3EKevin%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2204983%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Run%20Code%20on%20S32K148%20FlexNVM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2204983%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%40%3CSPAN%3EKevin74%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThe%20screenshot%20you%20provided%20is%20too%20blurry%EF%BC%8C%20i%20can%20get%20nothing%20from%20your%20picture.%3C%2FP%3E%0A%3CP%3EPlease%20take%20a%20look%20at%20the%20AN12323%20and%20AN12323SW%2C%20which%20provided%20detail%20usage%20about%20FLEXNVM%3C%2FP%3E%0A%3CP%3Eused%20as%20bootloader(but%20it's%20in%20bare-metal).%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E