KW45 noinit ram section

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

KW45 noinit ram section

Jump to solution
2,875 Views
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 Kudos
Reply
1 Solution
2,794 Views
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.

View solution in original post

0 Kudos
Reply
4 Replies
2,850 Views
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 Kudos
Reply
2,815 Views
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 Kudos
Reply
2,795 Views
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 Kudos
Reply
2,766 Views
Christine_Li
NXP TechSupport
NXP TechSupport

Hi, @jiajun_cheng 

Anything else I can do for you on this case?

 

Best regards,

Christine.

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2250923%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EKW45%20noinit%20ram%20section%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2250923%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2Cnxp%20Expert%EF%BC%9A%3CBR%20%2F%3EI%20want%20to%20isolate%20a%20portion%20of%20RAM%20in%20kw45%20for%20storing%20some%20flags.%20However%2C%20currently%20when%20I%20try%20to%20write%200xa5a5a5a5%20to%20address%200x02000000%20and%20then%20perform%20a%20soft%20reset%2C%20the%20value%20read%20from%20address%200x02000000%20after%20the%20reset%20is%200.%20Could%20you%20please%20help%20me%20figure%20out%20how%20to%20ensure%20that%20the%20value%20read%20after%20the%20soft%20reset%20remains%20the%20same%20as%20before%20the%20reset%3F%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%26nbsp%3B%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%3EHi%2C%26nbsp%3B%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%26nbsp%3B%3A%3C%2FP%3E%3CP%3E%3CSPAN%3EHowever%2C%20I%20noticed%20this%20section%20of%20code%20again%20in%20the%20startup%20file%26nbsp%3B%3C%2FSPAN%3Estartup_KW45B41Z83.S%3CSPAN%3E%E2%80%94doesn%E2%80%99t%20it%20clear%20the%20memory%20range%20from%26nbsp%3B%3C%2FSPAN%3E0x2001_A000%3CSPAN%3E%26nbsp%3Bto%26nbsp%3B%3C%2FSPAN%3E0x2001_C000%3CSPAN%3E%3F%3C%2FSPAN%3E%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%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%3EHi%2C%26nbsp%3B%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%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20last%208%20KB%20RAM%20(0x2001_A000)%20is%20from%20independent%20power%20switch%20domain%20which%20can%20keep%20data%20retention%20in%20all%20power%20modes.%3C%2FP%3E%0A%3CP%3EFor%20details%2C%20please%20refer%20to%26nbsp%3B%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%20Reference%20Manual%3C%2FSPAN%3E%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EPlease%20let%20me%20know%20whether%20have%20any%20other%20concerns%20on%20this%20case.%3C%2FP%3E%0A%3CP%3EOtherwise%2C%20please%20do%20not%20hesitate%20to%20mark%20my%20answer%20as%20a%20solution%2C%20so%20that%20we%20can%20close%20this%20case.%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3EChristine.%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%3EHi%2C%26nbsp%3B%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%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAnything%20else%20I%20can%20do%20for%20you%20on%20this%20case%3F%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3EChristine.%3C%2FP%3E%3C%2FLINGO-BODY%3E