SRAM vs ITCM VS DTCM

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

SRAM vs ITCM VS DTCM

Jump to solution
6,266 Views
Yellow
Contributor I

Hello,

I'm using S32Kx, i can see there are 3 different RAM. SRAM/ITCM/DTCM. i have few question related to this.

1. what is the Difference between SRAM vs ITCM vs DTCM?

2. if all are RAM why there is difference?

3. what kind of data we can store this RAM's(each)?

4. why this 3 different type of RAM Required?

 

S32K3 

 

 

0 Kudos
Reply
1 Solution
6,226 Views
RomanVR
NXP Employee
NXP Employee

Hi @Yellow 

1. What is the Difference between SRAM vs ITCM vs DTCM?
SRAM (Static Random Access Memory) is a type of memory with the purpose of storing and accessing data.
ITCM (Instruction Tightly Coupled Memory) is a type of memory which has a dedicated connection to the core and addressed to use with instructions directly
DTCM (Data Tightly Coupled Memory) is a type of memory similar to ITCM with a dedicated connection to the core but addressed to use with data.


2. If all are RAM why there is difference?
SRAM do not have a dedicated connection to the core, therefore, since ITCM and DTCM have a dedicated connection, access time to both memories is reduced to 1 clock cycle.


3. What kind of data we can store in each RAM?
You can store any kind of your code date in SRAM, however, since ITCM and DTCM are fast access memories, ideally you would use DTCM to store critical variables and frequently updated variables, and ITCM to access critical functions, routines and ISRs.


4. Why this 3 different type of RAM required?
ITCM and DTCM are features with the main purpose to exploit them in real time operating systems thanks to their fast access characteristic, so SRAM can be given a RAM common use.


For more information about S32K3xx family memory types, we provide Memories Guide application note which explains this topic in detail. It can be downloaded from: S32K3 Microcontrollers for Automotive General Purpose > Documentation > AN13388: S32K3 Memories Guide - Application Note.

Have an excellent day! - RomanVR.

 

Best Regards!

View solution in original post

1 Reply
6,227 Views
RomanVR
NXP Employee
NXP Employee

Hi @Yellow 

1. What is the Difference between SRAM vs ITCM vs DTCM?
SRAM (Static Random Access Memory) is a type of memory with the purpose of storing and accessing data.
ITCM (Instruction Tightly Coupled Memory) is a type of memory which has a dedicated connection to the core and addressed to use with instructions directly
DTCM (Data Tightly Coupled Memory) is a type of memory similar to ITCM with a dedicated connection to the core but addressed to use with data.


2. If all are RAM why there is difference?
SRAM do not have a dedicated connection to the core, therefore, since ITCM and DTCM have a dedicated connection, access time to both memories is reduced to 1 clock cycle.


3. What kind of data we can store in each RAM?
You can store any kind of your code date in SRAM, however, since ITCM and DTCM are fast access memories, ideally you would use DTCM to store critical variables and frequently updated variables, and ITCM to access critical functions, routines and ISRs.


4. Why this 3 different type of RAM required?
ITCM and DTCM are features with the main purpose to exploit them in real time operating systems thanks to their fast access characteristic, so SRAM can be given a RAM common use.


For more information about S32K3xx family memory types, we provide Memories Guide application note which explains this topic in detail. It can be downloaded from: S32K3 Microcontrollers for Automotive General Purpose > Documentation > AN13388: S32K3 Memories Guide - Application Note.

Have an excellent day! - RomanVR.

 

Best Regards!
%3CLINGO-SUB%20id%3D%22lingo-sub-2007088%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ESRAM%20vs%20ITCM%20VS%20DTCM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2007088%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3EI'm%20using%20S32Kx%2C%20i%20can%20see%20there%20are%203%20different%20RAM.%20SRAM%2FITCM%2FDTCM.%20i%20have%20few%20question%20related%20to%20this.%3C%2FP%3E%3CP%3E1.%20what%20is%20the%20Difference%20between%20SRAM%20vs%20ITCM%20vs%20DTCM%3F%3C%2FP%3E%3CP%3E2.%20if%20all%20are%20RAM%20why%20there%20is%20difference%3F%3C%2FP%3E%3CP%3E3.%20what%20kind%20of%20data%20we%20can%20store%20this%20RAM's(each)%3F%3C%2FP%3E%3CP%3E4.%20why%20this%203%20different%20type%20of%20RAM%20Required%3F%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fc-pwmxy87654%2FS32K3%2Fpd-p%2FS32K3%22%20class%3D%22lia-product-mention%22%20data-product%3D%221688-1%22%20target%3D%22_blank%22%3ES32K3%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2008402%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20SRAM%20vs%20ITCM%20VS%20DTCM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2008402%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%2F229600%22%20target%3D%22_blank%22%3E%40Yellow%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E1.%20What%20is%20the%20Difference%20between%20SRAM%20vs%20ITCM%20vs%20DTCM%3F%3C%2FSTRONG%3E%3CBR%20%2F%3ESRAM%20(Static%20Random%20Access%20Memory)%20is%20a%20type%20of%20memory%20with%20the%20purpose%20of%20storing%20and%20accessing%20data.%3CBR%20%2F%3EITCM%20(Instruction%20Tightly%20Coupled%20Memory)%20is%20a%20type%20of%20memory%20which%20has%20a%20dedicated%20connection%20to%20the%20core%20and%20addressed%20to%20use%20with%20instructions%20directly%3CBR%20%2F%3EDTCM%20(Data%20Tightly%20Coupled%20Memory)%20is%20a%20type%20of%20memory%20similar%20to%20ITCM%20with%20a%20dedicated%20connection%20to%20the%20core%20but%20addressed%20to%20use%20with%20data.%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3E%3CSTRONG%3E2.%20If%20all%20are%20RAM%20why%20there%20is%20difference%3F%3C%2FSTRONG%3E%3CBR%20%2F%3ESRAM%20do%20not%20have%20a%20dedicated%20connection%20to%20the%20core%2C%20therefore%2C%20since%20ITCM%20and%20DTCM%20have%20a%20dedicated%20connection%2C%20access%20time%20to%20both%20memories%20is%20reduced%20to%201%20clock%20cycle.%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3E%3CSTRONG%3E3.%20What%20kind%20of%20data%20we%20can%20store%20in%20each%20RAM%3F%3C%2FSTRONG%3E%3CBR%20%2F%3EYou%20can%20store%20any%20kind%20of%20your%20code%20date%20in%20SRAM%2C%20however%2C%20since%20ITCM%20and%20DTCM%20are%20fast%20access%20memories%2C%20ideally%20you%20would%20use%20DTCM%20to%20store%20critical%20variables%20and%20frequently%20updated%20variables%2C%20and%20ITCM%20to%20access%20critical%20functions%2C%20routines%20and%20ISRs.%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3E%3CSTRONG%3E4.%20Why%20this%203%20different%20type%20of%20RAM%20required%3F%3C%2FSTRONG%3E%3CBR%20%2F%3EITCM%20and%20DTCM%20are%20features%20with%20the%20main%20purpose%20to%20exploit%20them%20in%20real%20time%20operating%20systems%20thanks%20to%20their%20fast%20access%20characteristic%2C%20so%20SRAM%20can%20be%20given%20a%20RAM%20common%20use.%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EFor%20more%20information%20about%20S32K3xx%20family%20memory%20types%2C%20we%20provide%20Memories%20Guide%20application%20note%20which%20explains%20this%20topic%20in%20detail.%20It%20can%20be%20downloaded%20from%3A%20S32K3%20Microcontrollers%20for%20Automotive%20General%20Purpose%20%26gt%3B%20Documentation%20%26gt%3B%20AN13388%3A%20S32K3%20Memories%20Guide%20-%20Application%20Note.%3C%2FP%3E%0A%3CP%3EHave%20an%20excellent%20day!%20-%20RomanVR.%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E