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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
934 次查看
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 项奖励
回复
1 解答
884 次查看
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 项奖励
回复
2 回复数
885 次查看
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 项奖励
回复
906 次查看
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 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-1924328%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%A6%82%E6%9E%9C%20MCU%20%E5%9C%A8%20MC_ME%20%E5%AF%84%E5%AD%98%E5%99%A8%E4%B8%AD%E8%AE%BE%E7%BD%AE%E4%BA%86%20FUNC_RST%20%E4%BD%8D%EF%BC%8CSRAM%20%E6%98%AF%E5%90%A6%E4%BC%9A%E8%A2%AB%E8%AE%BE%E7%BD%AE%E4%B8%BA%200%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1924328%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%EF%BC%9A%3C%2FP%3E%3CP%3E%E6%88%91%E6%83%B3%E4%BD%BF%E7%94%A8%E5%85%B1%E4%BA%AB%EF%BC%88%E6%97%A0%E6%B8%85%E9%99%A4%EF%BC%89RAM%EF%BC%8C%E5%9B%A0%E4%B8%BA%E5%A6%82%E6%9E%9C%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E8%8E%B7%E5%BE%97%20uds%2010%2002%EF%BC%8C%E6%88%91%E6%83%B3%E8%B7%B3%E8%BD%AC%E5%88%B0%E5%BC%95%E5%AF%BC%E5%8A%A0%E8%BD%BD%EF%BC%8C%E5%9B%A0%E6%AD%A4%20ASW%20%E5%BA%94%E8%AF%A5%E5%B0%86%E9%87%8D%E6%96%B0%E5%88%B7%E6%96%B0%E6%A0%87%E5%BF%97%E6%94%BE%E5%9C%A8%E6%97%A0%E6%B8%85%E9%99%A4%E7%9A%84%20RAM%20%E4%B8%AD%EF%BC%8C%E8%BF%99%E6%A0%B7%E5%8F%AF%E4%BB%A5%E5%9C%A8%E9%87%8D%E7%BD%AE%E5%90%8E%E4%BF%9D%E7%95%99%E9%87%8D%E6%96%B0%E5%88%B7%E6%96%B0%E6%A0%87%E5%BF%97%EF%BC%88%E9%87%8D%E7%BD%AE%E7%B1%BB%E5%9E%8B%E6%98%AF%E5%90%A6%E4%BC%9A%E5%AF%B9%20sram%20%E7%9A%84%E6%80%A7%E8%83%BD%E4%BA%A7%E7%94%9F%E4%BB%BB%E4%BD%95%E4%B8%8D%E5%90%8C%EF%BC%9F%EF%BC%89%E3%80%82%E4%BD%86%E6%98%AF%E5%BD%93%E6%88%91%E5%B0%9D%E8%AF%95%E8%B0%83%E7%94%A8%E2%80%9CMCU_PerformReset%E2%80%9D%E5%B9%B6%E8%A7%82%E5%AF%9F%E6%88%91%E5%9C%A8ld%E6%96%87%E4%BB%B6%E4%B8%AD%E8%AE%BE%E7%BD%AENOCLEAR%E6%88%96NOLOAD%E7%9A%84ram%E7%9A%84%E5%80%BC%E6%97%B6%EF%BC%8C%E6%88%91%E5%8F%91%E7%8E%B0%E5%9C%A8%E5%90%AF%E5%8A%A8%E6%89%A7%E8%A1%8C%E2%80%9Cstartup.c%E2%80%9D%E4%B8%AD%E7%9A%84%E5%87%BD%E6%95%B0%E2%80%9Cinit_data_bss%E2%80%9D%E4%B9%8B%E5%89%8D%E8%AF%A5%E5%80%BC%E8%A2%AB%E8%AE%BE%E7%BD%AE%E4%B8%BA%E9%9B%B6%E3%80%82%E6%88%91%E6%97%A0%E6%B3%95%E5%9C%A8%20.S%20%E6%96%87%E4%BB%B6%E4%B8%AD%E8%AE%BE%E7%BD%AE%E6%96%AD%E7%82%B9%EF%BC%8C%E6%89%80%E4%BB%A5%E6%88%91%E6%97%A0%E6%B3%95%E7%A1%AE%E5%AE%9A%20.S%20%E6%96%87%E4%BB%B6%E4%B8%AD%E7%9A%84%E8%A1%8C%E4%B8%BA%E3%80%82%3C%2FP%3E%3CBR%20%2F%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%20%E5%A6%82%E6%9E%9C%20MCU%20%E5%9C%A8%20MC_ME%20%E5%AF%84%E5%AD%98%E5%99%A8%E4%B8%AD%E8%AE%BE%E7%BD%AE%E4%BA%86%20FUNC_%20RST%20%E4%BD%8D%EF%BC%8CSRAM%20%E6%98%AF%E5%90%A6%E4%BC%9A%E8%A2%AB%E8%AE%BE%E7%BD%AE%E4%B8%BA%200%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1924814%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%88%91%E6%94%B6%E5%88%B0%E4%BA%86FAE%E7%9A%84%E5%9B%9E%E5%A4%8D%EF%BC%8C%E4%BB%96%E5%91%8A%E8%AF%89%E6%88%91%EF%BC%8C%E6%88%91%E5%BA%94%E8%AF%A5%E4%BD%BF%E7%94%A8%E5%AE%9A%E4%B9%89%E4%B8%BA%E2%80%9Cram_rsvd2%E2%80%9D%E7%9A%84%E5%86%85%E5%AD%98%EF%BC%8C%E5%B9%B6%E5%B0%86ram_rsvd2%E7%9A%84%E5%8E%9F%E5%A7%8B%E5%9C%B0%E5%9D%80%E5%90%91%E5%89%8D%E7%A7%BB%E5%8A%A8%E3%80%82%E4%BB%96%E7%9A%84%E6%84%8F%E6%80%9D%E6%98%AFram_rsvd2%E7%9A%84%E5%80%BC%E4%B8%8D%E4%BC%9A%E8%A2%ABMCU%E6%B8%85%E9%99%A4%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E