TCM (Overview)


Introduction

TCM is an abbreviation for "Tightly Coupled Memory." It is high-speed memory attached directly to the ARM9 core. Since this memory is not connected to the ARM9 bus, it is possible to use it even during DMA.

There are two types of TCM: Instruction TCM (ITCM) and Data TCM (DTCM). ITCM has 32 kilobytes of space, while DTCM has 16 kilobytes. ITCM can store instructions and data. DTCM can store data, but cannot store instructions.


Mapping

ITCM can be mapped to an address that is a multiple of 32 KB, while DTCM can be mapped to an address that is 16 KB. In the NitroSDK, ITCM is mapped at 0x01FF8000 - 0x01FFFFFF, while DTCM is mapped at 0x027C0000 - 0x027C3FFF. These positions can be altered under specific conditions, but if it is not necessary to do so, it is recommended that development be performed with the configuration as-is.


Enabling and Disabling

ITCM and DTCM can be enabled and disabled with the following functions:

OS_EnableITCM()
OS_DisableITCM()
OS_EnableDTCM()
OS_DisableDTCM()


Obtaining and Configuring the DTCM Addresses

For DTCM, OS_GetDTCMAddress() can be used to get the mapped address. OS_SetDTCMAddress() sets the address. However, if DTCM changes the program wherein the stack region and each hook vector, etc. are being mapped while that program is running, it is possible that the program will become unstable. It is therefore recommended that you avoid making frequent changes with one program.

ITCM has no Set or Get functions. The constant HW_ITCM is normally defined at the ITCM starting address 0x01FF8000.


TCM–Related CP15 Settings

The ITCM and DTCM configurations depend on the configuration of the internal register of co-processor 15 (CP15). An API in the NitroSDK gives direct access to this register. Set and Get functions are included for the parameters to be provided to the register (or loaded into the register) separately for ITCM and DTCM. However, in order to use them (particularly the Set functions), their operating principles must be understood.

OS_SetITCMParam()
OS_GetITCMParam()
OS_SetDTCMParam()
OS_GetDTCMParam()

See Also

An Overview of OS Functions (TCM)

Revision History

11/09/2004 Initial version