KW45 noinit ram section

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

KW45 noinit ram section

跳至解决方案
2,923 次查看
jiajun_cheng
Contributor III

Hi,nxp Expert:
I want to isolate a portion of RAM in kw45 for storing some flags. However, currently when I try to write 0xa5a5a5a5 to address 0x02000000 and then perform a soft reset, the value read from address 0x02000000 after the reset is 0. Could you please help me figure out how to ensure that the value read after the soft reset remains the same as before the reset?

KW45 

0 项奖励
回复
1 解答
2,842 次查看
Christine_Li
NXP TechSupport
NXP TechSupport

Hi, @jiajun_cheng 

From the code side, you are right, it will clear this area.

You need to modify, and not perform any write operations to this region during startup.

Below is my suggestions:

1.remove this initialization for the retention RAM section.

or

2. You can keep those loops but skip the retention RAM range.

or

3. Ensure the initialization table does not include the retention RAM region at all.

Please let me know whether have any other concerns on this case.

 

Best regards,

Christine.

在原帖中查看解决方案

0 项奖励
回复
4 回复数
2,898 次查看
Christine_Li
NXP TechSupport
NXP TechSupport

Hi, @jiajun_cheng 

The last 8 KB RAM (0x2001_A000) is from independent power switch domain which can keep data retention in all power modes.

For details, please refer to KW45 Reference Manual

Please let me know whether have any other concerns on this case.

Otherwise, please do not hesitate to mark my answer as a solution, so that we can close this case.

Best regards,

Christine.

0 项奖励
回复
2,863 次查看
jiajun_cheng
Contributor III

Hi, @Christine_Li :

However, I noticed this section of code again in the startup file startup_KW45B41Z83.S—doesn’t it clear the memory range from 0x2001_A000 to 0x2001_C000?

.ram_init_stcm5:
    ldr     r0, =0x2001a000
    ldr     r1, =0x2001c000
.loop5:                         /* Initialize stcm5 */
    stmia   r0!, {r2 - r5}
    cmp     r0, r1
    bcc.n   .loop5

 

0 项奖励
回复
2,843 次查看
Christine_Li
NXP TechSupport
NXP TechSupport

Hi, @jiajun_cheng 

From the code side, you are right, it will clear this area.

You need to modify, and not perform any write operations to this region during startup.

Below is my suggestions:

1.remove this initialization for the retention RAM section.

or

2. You can keep those loops but skip the retention RAM range.

or

3. Ensure the initialization table does not include the retention RAM region at all.

Please let me know whether have any other concerns on this case.

 

Best regards,

Christine.

0 项奖励
回复
2,814 次查看
Christine_Li
NXP TechSupport
NXP TechSupport

Hi, @jiajun_cheng 

Anything else I can do for you on this case?

 

Best regards,

Christine.

0 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-2250923%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EKW45%20noinit%20%E6%9F%B1%E5%A1%9E%E9%83%A8%E5%88%86%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2250923%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%82%A8%E5%A5%BD%EF%BC%8Cnxp%20%E4%B8%93%E5%AE%B6%EF%BC%9A%3CBR%20%2F%3E%E6%88%91%E6%83%B3%E5%9C%A8%20kw45%20%E4%B8%AD%E9%9A%94%E7%A6%BB%E4%B8%80%E9%83%A8%E5%88%86%20RAM%EF%BC%8C%E7%94%A8%E4%BA%8E%E5%AD%98%E5%82%A8%E4%B8%80%E4%BA%9B%E6%A0%87%E5%BF%97%E3%80%82%E4%BD%86%E6%98%AF%EF%BC%8C%E5%BD%93%E5%89%8D%EF%BC%8C%E5%BD%93%E6%88%91%E5%B0%9D%E8%AF%95%E5%B0%86%200xa5a5a5a5%20%E5%86%99%E5%85%A5%E5%9C%B0%E5%9D%80%200x020000000%20%E7%84%B6%E5%90%8E%E8%BF%9B%E8%A1%8C%E8%BD%AF%E5%A4%8D%E4%BD%8D%E6%97%B6%EF%BC%8CRESET%E5%90%8E%E4%BB%8E%E5%9C%B0%E5%9D%80%200x020000000%20%E8%AF%BB%E5%8F%96%E7%9A%84%E5%80%BC%E4%B8%BA%200%E3%80%82%E4%BD%A0%E8%83%BD%E5%90%A6%E5%B8%AE%E6%88%91%E5%BC%84%E6%B8%85%E6%A5%9A%E5%A6%82%E4%BD%95%E7%A1%AE%E4%BF%9D%E8%BD%AF%E5%A4%8D%E4%BD%8D%E5%90%8E%E8%AF%BB%E5%8F%96%E7%9A%84%E5%80%BC%E4%B8%8ERESET%E5%89%8D%E8%AF%BB%E5%8F%96%E7%9A%84%E5%80%BC%E7%9B%B8%E5%90%8C%EF%BC%9F%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fc-pwmxy87654%2FKW45%2Fpd-p%2FKW45%22%20class%3D%22lia-product-mention%22%20data-product%3D%22615-1%22%20target%3D%22_blank%22%3EKW45%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2251531%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20KW45%20noinit%20ram%20section%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2251531%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%EF%BC%8C%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F205377%22%20target%3D%22_blank%22%3E%40Christine_Li%3C%2FA%3E%EF%BC%9A%3C%2FP%3E%3CP%3E%3CSPAN%3E%E4%B8%8D%E8%BF%87%EF%BC%8C%E6%88%91%E5%8F%88%E6%B3%A8%E6%84%8F%E5%88%B0%E5%90%AF%E5%8A%A8%E6%96%87%E4%BB%B6%20startup_KW45B41Z83%20%3C%2FSPAN%3E.S%20%E4%B8%AD%3CSPAN%3E%E7%9A%84%E8%BF%99%E9%83%A8%E5%88%86%E4%BB%A3%E7%A0%81%20%3C%2FSPAN%3E--%3CSPAN%3E%E5%AE%83%E4%B8%8D%E6%98%AF%E6%B8%85%E9%99%A4%E4%BA%86%20%3C%2FSPAN%3E0x2001_A000%3CSPAN%3E%20%E8%87%B3%20%3C%2FSPAN%3E0x2001_C000%E7%9A%84%E5%86%85%E5%AD%98%E8%8C%83%E5%9B%B4%20%E5%90%97%EF%BC%9F%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%20translate%3D%22no%22%3E.ram_init_stcm5%3A%0A%20%20%20%20ldr%20%20%20%20%20r0%2C%20%3D0x2001a000%0A%20%20%20%20ldr%20%20%20%20%20r1%2C%20%3D0x2001c000%0A.loop5%3A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Initialize%20stcm5%20*%2F%0A%20%20%20%20stmia%20%20%20r0!%2C%20%7Br2%20-%20r5%7D%0A%20%20%20%20cmp%20%20%20%20%20r0%2C%20r1%0A%20%20%20%20bcc.n%20%20%20.loop5%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2251114%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20KW45%20noinit%20ram%20section%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2251114%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%EF%BC%8C%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F241854%22%20target%3D%22_blank%22%3E%40jiajun_cheng%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%E6%9C%80%E5%90%8E%208%20KB%20RAM%20(0x2001_A000)%20%E6%9D%A5%E8%87%AA%E7%8B%AC%E7%AB%8B%E7%9A%84%E7%94%B5%E6%BA%90%E5%BC%80%E5%85%B3%E5%8A%9F%E8%83%BD%E5%9F%9F%EF%BC%8C%E5%8F%AF%E5%9C%A8%E6%89%80%E6%9C%89%E7%94%B5%E6%BA%90%E6%A8%A1%E5%BC%8F%E4%B8%8B%E4%BF%9D%E6%8C%81%E6%95%B0%E6%8D%AE%E4%BF%9D%E7%95%99%E3%80%82%3C%2FP%3E%0A%3CP%3E%E8%AF%A6%E6%83%85%E8%AF%B7%E5%8F%82%E9%98%85%20%3CA%20id%3D%22relatedDocsClickPDF_1%22%20class%3D%22dtmcustomrulelink%22%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fwebapp%2FDownload%3FcolCode%3DKW45RM%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%20data-dtmaction%3D%22Documentation%20Section%20-%20Results%20Link%20Click%22%20data-dtmsearchresulttitle%3D%22KW45%20Reference%20Manual%22%20data-dtmsubaction%3D%22KW45%20Reference%20Manual%20-%20NXP%20-%20Reference%20Manual%20-%20English%22%20data-cl-id%3D%221853962181%22%3E%3CSPAN%3EKW45%20%E5%8F%82%E8%80%83%E6%89%8B%E5%86%8C%3C%2FSPAN%3E%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%E5%A6%82%E6%9E%9C%E6%82%A8%E5%AF%B9%E6%AD%A4%E6%A1%88%E6%9C%89%E4%BB%BB%E4%BD%95%E5%85%B6%E4%BB%96%E5%85%B3%E5%88%87%EF%BC%8C%E8%AF%B7%E5%91%8A%E8%AF%89%E6%88%91%E3%80%82%3C%2FP%3E%0A%3CP%3E%E5%90%A6%E5%88%99%EF%BC%8C%E8%AF%B7%E6%AF%AB%E4%B8%8D%E7%8A%B9%E8%B1%AB%E5%9C%B0%E5%B0%86%E6%88%91%E7%9A%84%E5%9B%9E%E7%AD%94%E6%A0%87%E8%AE%B0%E4%B8%BA%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88%EF%BC%8C%E8%BF%99%E6%A0%B7%E6%88%91%E4%BB%AC%E5%B0%B1%E5%8F%AF%E4%BB%A5%E7%BB%93%E6%A1%88%E4%BA%86%E3%80%82%3C%2FP%3E%0A%3CP%3E%E9%A1%BA%E7%A5%9D%E5%95%86%E7%A5%BA%EF%BC%81%3C%2FP%3E%0A%3CP%3EChristine%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2253620%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20KW45%20noinit%20ram%20section%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2253620%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%EF%BC%8C%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F241854%22%20target%3D%22_blank%22%3E%40jiajun_cheng%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%E5%9C%A8%E8%BF%99%E4%B8%AA%E6%A1%88%E5%AD%90%E4%B8%8A%E6%88%91%E8%BF%98%E8%83%BD%E4%B8%BA%E4%BD%A0%E5%81%9A%E4%BB%80%E4%B9%88%EF%BC%9F%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%E9%A1%BA%E7%A5%9D%E5%95%86%E7%A5%BA%EF%BC%81%3C%2FP%3E%0A%3CP%3EChristine%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E