does The SRAM being Set to 0 if MCU get FUNC_ RST bit Setting in MC_ME register

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

does The SRAM being Set to 0 if MCU get FUNC_ RST bit Setting in MC_ME register

Jump to solution
1,333 Views
yinqiu
Contributor III

hello:

I want to take use of a share(no clear )RAM,because I want to jump into bootload if application gets the uds 10 02,so ASW should put reflash flag in a noclear ram which can keep the reflash flag after reset(is the type of reset make any different performance of sram?). but when I try to call "MCU_PerformReset",and watch the value of ram which I set NOCLEAR or NOLOAD in the ld file,but I find the value is set to zero before the boot excute the function "init_data_bss" which in the "startup.c". I can not set brekpoint in the .S file, so I can ont sure the behaviour in the .S file .

 

0 Kudos
Reply
1 Solution
1,283 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @yinqiu,

The SRAM content is preserved across functional reset.

danielmartynek_0-1722934059413.png

The SRAM is initialized in startup_cm7.s up to __INT_SRAM_END, which is by default set to ORIGIN(ram_rsvd2), so you need to adjust that.

After any reset, when the debugger is disconnected, we can trap the execution is a loop like this.

danielmartynek_1-1722934313801.png

 

Regards,

Daniel

View solution in original post

0 Kudos
Reply
2 Replies
1,284 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @yinqiu,

The SRAM content is preserved across functional reset.

danielmartynek_0-1722934059413.png

The SRAM is initialized in startup_cm7.s up to __INT_SRAM_END, which is by default set to ORIGIN(ram_rsvd2), so you need to adjust that.

After any reset, when the debugger is disconnected, we can trap the execution is a loop like this.

danielmartynek_1-1722934313801.png

 

Regards,

Daniel

0 Kudos
Reply
1,305 Views
yinqiu
Contributor III

I got the response form FAE and he told me that I should take use of the memory defined as "ram_rsvd2" and move the origin address of ram_rsvd2 forward. he means the value of ram_rsvd2 won't be cleared by MCU .

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1924328%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Edoes%20The%20SRAM%20being%20Set%20to%200%20if%20MCU%20get%20FUNC_%20RST%20bit%20Setting%20in%20MC_ME%20register%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1924328%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Ehello%3A%3C%2FP%3E%3CP%3EI%20want%20to%20take%20use%20of%20a%20share(no%20clear%20)RAM%2Cbecause%20I%20want%20to%20jump%20into%20bootload%20if%20application%20gets%20the%20uds%2010%2002%2Cso%20ASW%20should%20put%20reflash%20flag%20in%20a%20noclear%20ram%20which%20can%20keep%20the%20reflash%20flag%20after%20reset(is%20the%20type%20of%20reset%20make%20any%20different%20performance%20of%20sram%3F).%20but%20when%20I%20try%20to%20call%20%22MCU_PerformReset%22%2Cand%20watch%20the%20value%20of%20ram%20which%20I%20set%20NOCLEAR%20or%20NOLOAD%20in%20the%20ld%20file%2Cbut%20I%20find%20the%20value%20is%20set%20to%20zero%20before%20the%20boot%20excute%20the%20function%20%22init_data_bss%22%20which%20in%20the%20%22startup.c%22.%20I%20can%20not%20set%20brekpoint%20in%20the%20.S%20file%2C%20so%20I%20can%20ont%20sure%20the%20behaviour%20in%20the%20.S%20file%20.%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1926175%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20does%20The%20SRAM%20being%20Set%20to%200%20if%20MCU%20get%20FUNC_%20RST%20bit%20Setting%20in%20MC_ME%20register%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1926175%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F207672%22%20target%3D%22_blank%22%3E%40yinqiu%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EThe%20SRAM%20content%20is%20preserved%20across%20functional%20reset.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22danielmartynek_0-1722934059413.png%22%20style%3D%22width%3A%20697px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22danielmartynek_0-1722934059413.png%22%20style%3D%22width%3A%20697px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F292122iA1B1C2ECBA8E1A22%2Fimage-dimensions%2F697x115%3Fv%3Dv2%22%20width%3D%22697%22%20height%3D%22115%22%20role%3D%22button%22%20title%3D%22danielmartynek_0-1722934059413.png%22%20alt%3D%22danielmartynek_0-1722934059413.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThe%20SRAM%20is%20initialized%20in%20startup_cm7.s%20up%20to%20%3CSTRONG%3E__INT_SRAM_END%3C%2FSTRONG%3E%2C%20which%20is%20by%20default%20set%20to%20ORIGIN(ram_rsvd2)%2C%20so%20you%20need%20to%20adjust%20that.%3C%2FP%3E%0A%3CP%3EAfter%20any%20reset%2C%20when%20the%20debugger%20is%20disconnected%2C%20we%20can%20trap%20the%20execution%20is%20a%20loop%20like%20this.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22danielmartynek_1-1722934313801.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22danielmartynek_1-1722934313801.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F292124iC205D483EBEC1899%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22danielmartynek_1-1722934313801.png%22%20alt%3D%22danielmartynek_1-1722934313801.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3EDaniel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1924814%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%20does%20The%20SRAM%20being%20Set%20to%200%20if%20MCU%20get%20FUNC_%20RST%20bit%20Setting%20in%20MC_ME%20register%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1924814%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20got%20the%20response%20form%20FAE%20and%20he%20told%20me%20that%20I%20should%20take%20use%20of%20the%20memory%20defined%20as%20%22ram_rsvd2%22%20and%20move%20the%20origin%20address%20of%26nbsp%3Bram_rsvd2%20forward.%20he%20means%20the%20value%20of%26nbsp%3Bram_rsvd2%20won't%20be%20cleared%20by%20MCU%20.%3C%2FP%3E%3C%2FLINGO-BODY%3E