S32K322 TCMs

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

S32K322 TCMs

1,016 Views
Akshat_VE02376
Contributor III

Hi NXP,
This is regarding the usage of DTCM-0 and DTCM-1 in S32K322.
In our current project we are having a single binary for both the cores which leads to the storage of all global variables which are mapped with DTCM, use up DTCM of core-0.
All the SafeOs task stacks are allocated to DTCM-0.
I have a few questions:
1. If TCB stacks of master core and slave core tasks are uninitialized and mapped to DTCM-0, then at runtime core-1's task would automatically use up dtcm-1 since both DTCMs have same address? If not-> follow point 2.
2. How exactly can we manually map the data section for slave core's stack to core-1's DTCM?

0 Kudos
Reply
5 Replies

999 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Akshat_VE02376,

CM7_0 has direct access to DTCM_0, while CM7_1 has direct access to DTCM_1.
CM7_1 cannot directly access DTCM_0; it can only do so via the backdoor interface

danielmartynek_0-1760430406233.png

Each core (CM7_0 and CM7_1) has its own linker file and startup code, which allows for independent allocation of stack and memory regions.

 

Regards,

Daniel

 

0 Kudos
Reply

807 Views
Akshat_VE02376
Contributor III
Hi Daniel,
Is there no way to have a single linker and use up core-1's (slave core) DTCM-1 when both cores are active?
I really need this clarification for a closure!!
0 Kudos
Reply

777 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Akshat_VE02376,

Yes, that is possible.

In RTD 2.0.0, there was this example: Platform_Multicore_SingleElf_S32K324

The example has just one linker file.

Install S32DS 3.4 and add RTD 2.0.0 so that you can create a project from that example.

 

Regards,

Daniel

0 Kudos
Reply

773 Views
Akshat_VE02376
Contributor III
Hi Daniel,
Can you please provide me with the corresponding link?
0 Kudos
Reply

732 Views
danielmartynek
NXP TechSupport
NXP TechSupport
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2185388%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32K322%20TCMs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2185388%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20NXP%2C%3CBR%20%2F%3EThis%20is%20regarding%20the%20usage%20of%20DTCM-0%20and%20DTCM-1%20in%20S32K322.%3CBR%20%2F%3EIn%20our%20current%20project%20we%20are%20having%20a%20single%20binary%20for%20both%20the%20cores%20which%20leads%20to%20the%20storage%20of%20all%20global%20variables%20which%20are%20mapped%20with%20DTCM%2C%20use%20up%20DTCM%20of%20core-0.%3CBR%20%2F%3EAll%20the%20SafeOs%20task%20stacks%20are%20allocated%20to%20DTCM-0.%3CBR%20%2F%3EI%20have%20a%20few%20questions%3A%3CBR%20%2F%3E1.%20If%20TCB%20stacks%20of%20master%20core%20and%20slave%20core%20tasks%20are%20uninitialized%20and%20mapped%20to%20DTCM-0%2C%20then%20at%20runtime%20core-1's%20task%20would%20automatically%20use%20up%20dtcm-1%20since%20both%20DTCMs%20have%20same%20address%3F%20If%20not-%26gt%3B%20follow%20point%202.%3CBR%20%2F%3E2.%20How%20exactly%20can%20we%20manually%20map%20the%20data%20section%20for%20slave%20core's%20stack%20to%20core-1's%20DTCM%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2203502%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K322%20TCMs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2203502%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F244645%22%20target%3D%22_blank%22%3E%40Akshat_VE02376%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3ES32DS%203.4%20IDE%20can%20be%20downloaded%20here%3A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdesign%2Fdesign-center%2Fsoftware%2Fautomotive-software-and-tools%2Fs32-design-studio-ide%2Fs32-design-studio-for-s32-platform%3AS32DS-S32PLATFORM%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.nxp.com%2Fdesign%2Fdesign-center%2Fsoftware%2Fautomotive-software-and-tools%2Fs32-design-studio-ide%2Fs32-design-studio-for-s32-platform%3AS32DS-S32PLATFORM%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EThe%20RTD%20is%20a%20part%20of%20the%20S32K3xx%20Standard%20SW%3A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fwebapp%2Fswlicensing%2Fsso%2FdownloadSoftware.sp%3Fcatid%3DSW32K3-STDSW-D%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.nxp.com%2Fwebapp%2Fswlicensing%2Fsso%2FdownloadSoftware.sp%3Fcatid%3DSW32K3-STDSW-D%3C%2FA%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2202760%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K322%20TCMs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2202760%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHi%20Daniel%2C%3CBR%20%2F%3ECan%20you%20please%20provide%20me%20with%20the%20corresponding%20link%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2202759%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K322%20TCMs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2202759%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F244645%22%20target%3D%22_blank%22%3E%40Akshat_VE02376%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EYes%2C%20that%20is%20possible.%3C%2FP%3E%0A%3CP%3EIn%20RTD%202.0.0%2C%20there%20was%20this%20example%3A%26nbsp%3BPlatform_Multicore_SingleElf_S32K324%3C%2FP%3E%0A%3CP%3EThe%20example%20has%20just%20one%20linker%20file.%3C%2FP%3E%0A%3CP%3EInstall%20S32DS%203.4%20and%20add%20RTD%202.0.0%20so%20that%20you%20can%20create%20a%20project%20from%20that%20example.%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-2202298%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K322%20TCMs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2202298%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHi%20Daniel%2C%3CBR%20%2F%3EIs%20there%20no%20way%20to%20have%20a%20single%20linker%20and%20use%20up%20core-1's%20(slave%20core)%20DTCM-1%20when%20both%20cores%20are%20active%3F%3CBR%20%2F%3EI%20really%20need%20this%20clarification%20for%20a%20closure!!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2185514%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K322%20TCMs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2185514%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F244645%22%20target%3D%22_blank%22%3E%40Akshat_VE02376%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3ECM7_0%20has%20direct%20access%20to%20DTCM_0%2C%20while%20CM7_1%20has%20direct%20access%20to%20DTCM_1.%3CBR%20%2F%3ECM7_1%20cannot%20directly%20access%20DTCM_0%3B%20it%20can%20only%20do%20so%20via%20the%20backdoor%20interface%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22danielmartynek_0-1760430406233.png%22%20style%3D%22width%3A%20546px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22danielmartynek_0-1760430406233.png%22%20style%3D%22width%3A%20546px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F360632i81D91435A9845224%2Fimage-dimensions%2F546x296%3Fv%3Dv2%22%20width%3D%22546%22%20height%3D%22296%22%20role%3D%22button%22%20title%3D%22danielmartynek_0-1760430406233.png%22%20alt%3D%22danielmartynek_0-1760430406233.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EEach%20core%20(CM7_0%20and%20CM7_1)%20has%20its%20own%20linker%20file%20and%20startup%20code%2C%20which%20allows%20for%20independent%20allocation%20of%20stack%20and%20memory%20regions.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3EDaniel%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E