mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 23:40:19 +08:00
Fix much replicated typo. STM32 F4 SRAM is CCM, not TCM
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4571 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -57,7 +57,7 @@
|
|||||||
/* 0x00100000-0x07ffffff: Reserved */
|
/* 0x00100000-0x07ffffff: Reserved */
|
||||||
#define STM32_FLASH_BASE 0x08000000 /* 0x08000000-0x080fffff: FLASH memory */
|
#define STM32_FLASH_BASE 0x08000000 /* 0x08000000-0x080fffff: FLASH memory */
|
||||||
/* 0x08100000-0x0fffffff: Reserved */
|
/* 0x08100000-0x0fffffff: Reserved */
|
||||||
#define STM32_TCMRAM_BASE 0x10000000 /* 0x10000000-0x1000ffff: 64Kb TCM data RAM */
|
#define STM32_CCMRAM_BASE 0x10000000 /* 0x10000000-0x1000ffff: 64Kb CCM data RAM */
|
||||||
/* 0x10010000-0x1ffeffff: Reserved */
|
/* 0x10010000-0x1ffeffff: Reserved */
|
||||||
#define STM32_SYSMEM_BASE 0x1fff0000 /* 0x1fff0000-0x1fff7a0f: System memory */
|
#define STM32_SYSMEM_BASE 0x1fff0000 /* 0x1fff0000-0x1fff7a0f: System memory */
|
||||||
/* 0x1fff7a10-0x1fff7fff: Reserved */
|
/* 0x1fff7a10-0x1fff7fff: Reserved */
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
/* 0x00100000-0x07ffffff: Reserved */
|
/* 0x00100000-0x07ffffff: Reserved */
|
||||||
#define STM32_FLASH_BASE 0x08000000 /* 0x08000000-0x080fffff: FLASH memory */
|
#define STM32_FLASH_BASE 0x08000000 /* 0x08000000-0x080fffff: FLASH memory */
|
||||||
/* 0x08100000-0x0fffffff: Reserved */
|
/* 0x08100000-0x0fffffff: Reserved */
|
||||||
#define STM32_TCMRAM_BASE 0x10000000 /* 0x10000000-0x1000ffff: 64Kb TCM data RAM */
|
#define STM32_CCMRAM_BASE 0x10000000 /* 0x10000000-0x1000ffff: 64Kb CCM data RAM */
|
||||||
/* 0x10010000-0x1ffeffff: Reserved */
|
/* 0x10010000-0x1ffeffff: Reserved */
|
||||||
#define STM32_SYSMEM_BASE 0x1fff0000 /* 0x1fff0000-0x1fff7a0f: System memory */
|
#define STM32_SYSMEM_BASE 0x1fff0000 /* 0x1fff0000-0x1fff7a0f: System memory */
|
||||||
/* 0x1fff7a10-0x1fff7fff: Reserved */
|
/* 0x1fff7a10-0x1fff7fff: Reserved */
|
||||||
|
|||||||
@@ -61,11 +61,11 @@
|
|||||||
* CONFIG_DRAM_END : End address (+1) of SRAM (F1 family only, the
|
* CONFIG_DRAM_END : End address (+1) of SRAM (F1 family only, the
|
||||||
* : F4 family uses the a priori end of SRAM)
|
* : F4 family uses the a priori end of SRAM)
|
||||||
*
|
*
|
||||||
* The F4 family also contains internal TCM SRAM. This SRAM is different
|
* The F4 family also contains internal CCM SRAM. This SRAM is different
|
||||||
* because it cannot be used for DMA. So if DMA needed, then the following
|
* because it cannot be used for DMA. So if DMA needed, then the following
|
||||||
* should be defined to exclude TCM SRAM from the heap:
|
* should be defined to exclude CCM SRAM from the heap:
|
||||||
*
|
*
|
||||||
* CONFIG_STM32_TCMEXCLUDE : Exclude TCM SRAM from the HEAP
|
* CONFIG_STM32_CCMEXCLUDE : Exclude CCM SRAM from the HEAP
|
||||||
*
|
*
|
||||||
* In addition to internal SRAM, SRAM may also be available through the FSMC.
|
* In addition to internal SRAM, SRAM may also be available through the FSMC.
|
||||||
* In order to use FSMC SRAM, the following additional things need to be
|
* In order to use FSMC SRAM, the following additional things need to be
|
||||||
@@ -112,24 +112,24 @@
|
|||||||
# error "CONFIG_MM_REGIONS > 1 but I don't know what the other region(s) are"
|
# error "CONFIG_MM_REGIONS > 1 but I don't know what the other region(s) are"
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
/* The STM32 F1 has not TCM SRAM */
|
/* The STM32 F1 has not CCM SRAM */
|
||||||
|
|
||||||
# undef CONFIG_STM32_TCMEXCLUDE
|
# undef CONFIG_STM32_CCMEXCLUDE
|
||||||
# define CONFIG_STM32_TCMEXCLUDE 1
|
# define CONFIG_STM32_CCMEXCLUDE 1
|
||||||
|
|
||||||
/* All members of the STM32F20xxx and STM32F40xxx families have 192Kb in three banks:
|
/* All members of the STM32F20xxx and STM32F40xxx families have 192Kb in three banks:
|
||||||
*
|
*
|
||||||
* 1) 112Kb of System SRAM beginning at address 0x2000:0000
|
* 1) 112Kb of System SRAM beginning at address 0x2000:0000
|
||||||
* 2) 16Kb of System SRAM beginning at address 0x2001:c000
|
* 2) 16Kb of System SRAM beginning at address 0x2001:c000
|
||||||
* 3) 64Kb of TCM SRAM beginning at address 0x1000:0000
|
* 3) 64Kb of CCM SRAM beginning at address 0x1000:0000
|
||||||
*
|
*
|
||||||
* As determined by ld.script, g_heapbase lies in the 112Kb memory
|
* As determined by ld.script, g_heapbase lies in the 112Kb memory
|
||||||
* region and that extends to 0x2001:0000. But the first and second memory
|
* region and that extends to 0x2001:0000. But the first and second memory
|
||||||
* regions are contiguous and treated as one in this logic that extends to
|
* regions are contiguous and treated as one in this logic that extends to
|
||||||
* 0x2002:0000.
|
* 0x2002:0000.
|
||||||
*
|
*
|
||||||
* As a complication, it appears that TCM SRAM cannot be used for DMA. So, if
|
* As a complication, it appears that CCM SRAM cannot be used for DMA. So, if
|
||||||
* STM32 DMA is enabled, TCM SRAM should probably be excluded from the heap.
|
* STM32 DMA is enabled, CCM SRAM should probably be excluded from the heap.
|
||||||
*
|
*
|
||||||
* In addition, external FSMC SRAM may be available.
|
* In addition, external FSMC SRAM may be available.
|
||||||
*/
|
*/
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
|
|
||||||
# define SRAM1_END 0x20020000
|
# define SRAM1_END 0x20020000
|
||||||
|
|
||||||
/* Set the range of TCM SRAM as well (although we may not use it) */
|
/* Set the range of CCM SRAM as well (although we may not use it) */
|
||||||
|
|
||||||
# define SRAM2_START 0x10000000
|
# define SRAM2_START 0x10000000
|
||||||
# define SRAM2_END 0x10010000
|
# define SRAM2_END 0x10010000
|
||||||
@@ -150,19 +150,19 @@
|
|||||||
* Configuration 1. System SRAM (only)
|
* Configuration 1. System SRAM (only)
|
||||||
* CONFIG_MM_REGIONS == 1
|
* CONFIG_MM_REGIONS == 1
|
||||||
* CONFIG_STM32_FSMC_SRAM NOT defined
|
* CONFIG_STM32_FSMC_SRAM NOT defined
|
||||||
* CONFIG_STM32_TCMEXCLUDE defined
|
* CONFIG_STM32_CCMEXCLUDE defined
|
||||||
* Configuration 2. System SRAM and TCM SRAM
|
* Configuration 2. System SRAM and CCM SRAM
|
||||||
* CONFIG_MM_REGIONS == 2
|
* CONFIG_MM_REGIONS == 2
|
||||||
* CONFIG_STM32_FSMC_SRAM NOT defined
|
* CONFIG_STM32_FSMC_SRAM NOT defined
|
||||||
* CONFIG_STM32_TCMEXCLUDE NOT defined
|
* CONFIG_STM32_CCMEXCLUDE NOT defined
|
||||||
* Configuration 3. System SRAM and FSMC SRAM
|
* Configuration 3. System SRAM and FSMC SRAM
|
||||||
* CONFIG_MM_REGIONS == 2
|
* CONFIG_MM_REGIONS == 2
|
||||||
* CONFIG_STM32_FSMC_SRAM defined
|
* CONFIG_STM32_FSMC_SRAM defined
|
||||||
* CONFIG_STM32_TCMEXCLUDE defined
|
* CONFIG_STM32_CCMEXCLUDE defined
|
||||||
* Configuration 4. System SRAM, TCM SRAM, and FSMC SRAM
|
* Configuration 4. System SRAM, CCM SRAM, and FSMC SRAM
|
||||||
* CONFIG_MM_REGIONS == 3
|
* CONFIG_MM_REGIONS == 3
|
||||||
* CONFIG_STM32_FSMC_SRAM defined
|
* CONFIG_STM32_FSMC_SRAM defined
|
||||||
* CONFIG_STM32_TCMEXCLUDE NOT defined
|
* CONFIG_STM32_CCMEXCLUDE NOT defined
|
||||||
*
|
*
|
||||||
* Let's make sure that all definitions are consitent before doing
|
* Let's make sure that all definitions are consitent before doing
|
||||||
* anything else
|
* anything else
|
||||||
@@ -177,20 +177,20 @@
|
|||||||
# if CONFIG_MM_REGIONS < 2
|
# if CONFIG_MM_REGIONS < 2
|
||||||
/* Only one memory region. Force Configuration 1 */
|
/* Only one memory region. Force Configuration 1 */
|
||||||
|
|
||||||
# warning "FSMC SRAM (and TCM SRAM) excluded from the heap"
|
# warning "FSMC SRAM (and CCM SRAM) excluded from the heap"
|
||||||
# undef CONFIG_STM32_FSMC_SRAM
|
# undef CONFIG_STM32_FSMC_SRAM
|
||||||
# undef CONFIG_STM32_TCMEXCLUDE
|
# undef CONFIG_STM32_CCMEXCLUDE
|
||||||
# define CONFIG_STM32_TCMEXCLUDE 1
|
# define CONFIG_STM32_CCMEXCLUDE 1
|
||||||
|
|
||||||
/* CONFIG_MM_REGIONS may be 3 if TCM SRAM is included in the head */
|
/* CONFIG_MM_REGIONS may be 3 if CCM SRAM is included in the head */
|
||||||
|
|
||||||
# elif CONFIG_MM_REGIONS > 2
|
# elif CONFIG_MM_REGIONS > 2
|
||||||
|
|
||||||
/* More than two memory regions. This is okay if TCM SRAM is not
|
/* More than two memory regions. This is okay if CCM SRAM is not
|
||||||
* disabled.
|
* disabled.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
# if defined(CONFIG_STM32_TCMEXCLUDE)
|
# if defined(CONFIG_STM32_CCMEXCLUDE)
|
||||||
|
|
||||||
/* Configuration 3: CONFIG_MM_REGIONS should have been 2 */
|
/* Configuration 3: CONFIG_MM_REGIONS should have been 2 */
|
||||||
|
|
||||||
@@ -204,7 +204,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
# ifdef (CONFIG_STM32_DMA)
|
# ifdef (CONFIG_STM32_DMA)
|
||||||
# warning "TCM SRAM is included in the heap AND DMA is enabled"
|
# warning "CCM SRAM is included in the heap AND DMA is enabled"
|
||||||
# endif
|
# endif
|
||||||
# if CONFIG_MM_REGIONS != 3
|
# if CONFIG_MM_REGIONS != 3
|
||||||
# error "CONFIG_MM_REGIONS > 3 but I don't know what some of the region(s) are"
|
# error "CONFIG_MM_REGIONS > 3 but I don't know what some of the region(s) are"
|
||||||
@@ -213,29 +213,29 @@
|
|||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
/* CONFIG_MM_REGIONS is exactly 2. We cannot support both TCM SRAM and
|
/* CONFIG_MM_REGIONS is exactly 2. We cannot support both CCM SRAM and
|
||||||
* FSMC SRAM.
|
* FSMC SRAM.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
# elif !defined(CONFIG_STM32_TCMEXCLUDE)
|
# elif !defined(CONFIG_STM32_CCMEXCLUDE)
|
||||||
# error "CONFIG_MM_REGIONS == 2, cannot support both TCM SRAM and FSMC SRAM"
|
# error "CONFIG_MM_REGIONS == 2, cannot support both CCM SRAM and FSMC SRAM"
|
||||||
# undef CONFIG_STM32_TCMEXCLUDE
|
# undef CONFIG_STM32_CCMEXCLUDE
|
||||||
# define CONFIG_STM32_TCMEXCLUDE 1
|
# define CONFIG_STM32_CCMEXCLUDE 1
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# elif !defined(CONFIG_STM32_TCMEXCLUDE)
|
# elif !defined(CONFIG_STM32_CCMEXCLUDE)
|
||||||
|
|
||||||
/* Configuration 2: FSMC SRAM is not used, but TCM SRAM is requested. DMA
|
/* Configuration 2: FSMC SRAM is not used, but CCM SRAM is requested. DMA
|
||||||
* should be disabled and CONFIG_MM_REGIONS should be 2.
|
* should be disabled and CONFIG_MM_REGIONS should be 2.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
# ifdef CONFIG_STM32_DMA
|
# ifdef CONFIG_STM32_DMA
|
||||||
# warning "TCM SRAM is included in the heap AND DMA is enabled"
|
# warning "CCM SRAM is included in the heap AND DMA is enabled"
|
||||||
# endif
|
# endif
|
||||||
# if CONFIG_MM_REGIONS < 2
|
# if CONFIG_MM_REGIONS < 2
|
||||||
# error "TCM SRAM excluded from the heap because CONFIG_MM_REGIONS < 2"
|
# error "CCM SRAM excluded from the heap because CONFIG_MM_REGIONS < 2"
|
||||||
# undef CONFIG_STM32_TCMEXCLUDE
|
# undef CONFIG_STM32_CCMEXCLUDE
|
||||||
# define CONFIG_STM32_TCMEXCLUDE 1
|
# define CONFIG_STM32_CCMEXCLUDE 1
|
||||||
# elif CONFIG_MM_REGIONS > 2
|
# elif CONFIG_MM_REGIONS > 2
|
||||||
# error "CONFIG_MM_REGIONS > 2 but I don't know what some of the region(s) are"
|
# error "CONFIG_MM_REGIONS > 2 but I don't know what some of the region(s) are"
|
||||||
# undef CONFIG_MM_REGIONS
|
# undef CONFIG_MM_REGIONS
|
||||||
@@ -300,9 +300,9 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
|||||||
#if CONFIG_MM_REGIONS > 1
|
#if CONFIG_MM_REGIONS > 1
|
||||||
void up_addregion(void)
|
void up_addregion(void)
|
||||||
{
|
{
|
||||||
/* Add the STM32F20xxx/STM32F40xxx TCM SRAM heap region. */
|
/* Add the STM32F20xxx/STM32F40xxx CCM SRAM heap region. */
|
||||||
|
|
||||||
#ifndef CONFIG_STM32_TCMEXCLUDE
|
#ifndef CONFIG_STM32_CCMEXCLUDE
|
||||||
mm_addregion((FAR void*)SRAM2_START, SRAM2_END-SRAM2_START);
|
mm_addregion((FAR void*)SRAM2_START, SRAM2_END-SRAM2_START);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
*
|
*
|
||||||
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
||||||
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
||||||
* 3) 64Kb of TCM SRAM beginning at address 0x1000:0000
|
* 3) 64Kb of CCM SRAM beginning at address 0x1000:0000
|
||||||
*
|
*
|
||||||
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
||||||
* where the code expects to begin execution by jumping to the entry point in
|
* where the code expects to begin execution by jumping to the entry point in
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
*
|
*
|
||||||
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
||||||
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
||||||
* 3) 64Kb of TCM SRAM beginning at address 0x1000:0000
|
* 3) 64Kb of CCM SRAM beginning at address 0x1000:0000
|
||||||
*
|
*
|
||||||
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
||||||
* where the code expects to begin execution by jumping to the entry point in
|
* where the code expects to begin execution by jumping to the entry point in
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
*
|
*
|
||||||
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
||||||
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
||||||
* 3) 64Kb of TCM SRAM beginning at address 0x1000:0000
|
* 3) 64Kb of CCM SRAM beginning at address 0x1000:0000
|
||||||
*
|
*
|
||||||
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
||||||
* where the code expects to begin execution by jumping to the entry point in
|
* where the code expects to begin execution by jumping to the entry point in
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
*
|
*
|
||||||
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
||||||
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
||||||
* 3) 64Kb of TCM SRAM beginning at address 0x1000:0000
|
* 3) 64Kb of CCM SRAM beginning at address 0x1000:0000
|
||||||
*
|
*
|
||||||
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
||||||
* where the code expects to begin execution by jumping to the entry point in
|
* where the code expects to begin execution by jumping to the entry point in
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
*
|
*
|
||||||
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
||||||
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
||||||
* 3) 64Kb of TCM SRAM beginning at address 0x1000:0000
|
* 3) 64Kb of CCM SRAM beginning at address 0x1000:0000
|
||||||
*
|
*
|
||||||
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
||||||
* where the code expects to begin execution by jumping to the entry point in
|
* where the code expects to begin execution by jumping to the entry point in
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
*
|
*
|
||||||
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
||||||
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
||||||
* 3) 64Kb of TCM SRAM beginning at address 0x1000:0000
|
* 3) 64Kb of CCM SRAM beginning at address 0x1000:0000
|
||||||
*
|
*
|
||||||
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
||||||
* where the code expects to begin execution by jumping to the entry point in
|
* where the code expects to begin execution by jumping to the entry point in
|
||||||
|
|||||||
@@ -456,11 +456,11 @@ The on-board SRAM can be configured by setting
|
|||||||
Configuration Options
|
Configuration Options
|
||||||
---------------------
|
---------------------
|
||||||
Internal SRAM is available in all members of the STM32 family. The F4 family
|
Internal SRAM is available in all members of the STM32 family. The F4 family
|
||||||
also contains internal TCM SRAM. This SRAM is different because it cannot
|
also contains internal CCM SRAM. This SRAM is different because it cannot
|
||||||
be used for DMA. So if DMA needed, then the following should be defined
|
be used for DMA. So if DMA needed, then the following should be defined
|
||||||
to exclude TCM SRAM from the heap:
|
to exclude CCM SRAM from the heap:
|
||||||
|
|
||||||
CONFIG_STM32_TCMEXCLUDE : Exclude TCM SRAM from the HEAP
|
CONFIG_STM32_CCMEXCLUDE : Exclude CCM SRAM from the HEAP
|
||||||
|
|
||||||
In addition to internal SRAM, SRAM may also be available through the FSMC.
|
In addition to internal SRAM, SRAM may also be available through the FSMC.
|
||||||
In order to use FSMC SRAM, the following additional things need to be
|
In order to use FSMC SRAM, the following additional things need to be
|
||||||
@@ -483,19 +483,19 @@ There are 4 possible SRAM configurations:
|
|||||||
Configuration 1. System SRAM (only)
|
Configuration 1. System SRAM (only)
|
||||||
CONFIG_MM_REGIONS == 1
|
CONFIG_MM_REGIONS == 1
|
||||||
CONFIG_STM32_FSMC_SRAM NOT defined
|
CONFIG_STM32_FSMC_SRAM NOT defined
|
||||||
CONFIG_STM32_TCMEXCLUDE defined
|
CONFIG_STM32_CCMEXCLUDE defined
|
||||||
Configuration 2. System SRAM and TCM SRAM
|
Configuration 2. System SRAM and CCM SRAM
|
||||||
CONFIG_MM_REGIONS == 2
|
CONFIG_MM_REGIONS == 2
|
||||||
CONFIG_STM32_FSMC_SRAM NOT defined
|
CONFIG_STM32_FSMC_SRAM NOT defined
|
||||||
CONFIG_STM32_TCMEXCLUDE NOT defined
|
CONFIG_STM32_CCMEXCLUDE NOT defined
|
||||||
Configuration 3. System SRAM and FSMC SRAM
|
Configuration 3. System SRAM and FSMC SRAM
|
||||||
CONFIG_MM_REGIONS == 2
|
CONFIG_MM_REGIONS == 2
|
||||||
CONFIG_STM32_FSMC_SRAM defined
|
CONFIG_STM32_FSMC_SRAM defined
|
||||||
CONFIG_STM32_TCMEXCLUDE defined
|
CONFIG_STM32_CCMEXCLUDE defined
|
||||||
Configuration 4. System SRAM, TCM SRAM, and FSMC SRAM
|
Configuration 4. System SRAM, CCM SRAM, and FSMC SRAM
|
||||||
CONFIG_MM_REGIONS == 3
|
CONFIG_MM_REGIONS == 3
|
||||||
CONFIG_STM32_FSMC_SRAM defined
|
CONFIG_STM32_FSMC_SRAM defined
|
||||||
CONFIG_STM32_TCMEXCLUDE NOT defined
|
CONFIG_STM32_CCMEXCLUDE NOT defined
|
||||||
|
|
||||||
STM3240G-EVAL-specific Configuration Options
|
STM3240G-EVAL-specific Configuration Options
|
||||||
============================================
|
============================================
|
||||||
@@ -554,7 +554,7 @@ STM3240G-EVAL-specific Configuration Options
|
|||||||
|
|
||||||
CONFIG_DRAM_END=(CONFIG_DRAM_START+CONFIG_DRAM_SIZE)
|
CONFIG_DRAM_END=(CONFIG_DRAM_START+CONFIG_DRAM_SIZE)
|
||||||
|
|
||||||
CONFIG_STM32_TCMEXCLUDE - Exclude TCM SRAM from the HEAP
|
CONFIG_STM32_CCMEXCLUDE - Exclude CCM SRAM from the HEAP
|
||||||
|
|
||||||
In addition to internal SRAM, SRAM may also be available through the FSMC.
|
In addition to internal SRAM, SRAM may also be available through the FSMC.
|
||||||
In order to use FSMC SRAM, the following additional things need to be
|
In order to use FSMC SRAM, the following additional things need to be
|
||||||
@@ -948,9 +948,9 @@ Where <subdir> is one of the following:
|
|||||||
|
|
||||||
4. In order to use SDIO without overruns, DMA must be used. The STM32 F4
|
4. In order to use SDIO without overruns, DMA must be used. The STM32 F4
|
||||||
has 192Kb of SRAM in two banks: 112Kb of "system" SRAM located at
|
has 192Kb of SRAM in two banks: 112Kb of "system" SRAM located at
|
||||||
0x2000:0000 and 64Kb of "TCM" SRAM located at 0x1000:0000. It appears
|
0x2000:0000 and 64Kb of "CCM" SRAM located at 0x1000:0000. It appears
|
||||||
that you cannot perform DMA from TCM SRAM. The work around that I have now
|
that you cannot perform DMA from CCM SRAM. The work around that I have now
|
||||||
is simply to omit the 64Kb of TCM SRAM from the heap so that all memory is
|
is simply to omit the 64Kb of CCM SRAM from the heap so that all memory is
|
||||||
allocated from System SRAM. This is done by setting:
|
allocated from System SRAM. This is done by setting:
|
||||||
|
|
||||||
CONFIG_MM_REGIONS=1
|
CONFIG_MM_REGIONS=1
|
||||||
|
|||||||
@@ -121,10 +121,10 @@ CONFIG_STM32_JTAG_NOJNTRST_ENABLE=n
|
|||||||
CONFIG_STM32_JTAG_SW_ENABLE=n
|
CONFIG_STM32_JTAG_SW_ENABLE=n
|
||||||
|
|
||||||
#
|
#
|
||||||
# On-chip TCM SRAM configuration
|
# On-chip CCM SRAM configuration
|
||||||
#
|
#
|
||||||
# CONFIG_STM32_TCMEXCLUDE - Exclude TCM SRAM from the HEAP. You would need
|
# CONFIG_STM32_CCMEXCLUDE - Exclude CCM SRAM from the HEAP. You would need
|
||||||
# to do this if DMA is enabled to prevent non-DMA-able TCM memory from
|
# to do this if DMA is enabled to prevent non-DMA-able CCM memory from
|
||||||
# being a part of the stack.
|
# being a part of the stack.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
*
|
*
|
||||||
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
||||||
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
||||||
* 3) 64Kb of TCM SRAM beginning at address 0x1000:0000
|
* 3) 64Kb of CCM SRAM beginning at address 0x1000:0000
|
||||||
*
|
*
|
||||||
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
||||||
* where the code expects to begin execution by jumping to the entry point in
|
* where the code expects to begin execution by jumping to the entry point in
|
||||||
|
|||||||
@@ -121,10 +121,10 @@ CONFIG_STM32_JTAG_NOJNTRST_ENABLE=n
|
|||||||
CONFIG_STM32_JTAG_SW_ENABLE=n
|
CONFIG_STM32_JTAG_SW_ENABLE=n
|
||||||
|
|
||||||
#
|
#
|
||||||
# On-chip TCM SRAM configuration
|
# On-chip CCM SRAM configuration
|
||||||
#
|
#
|
||||||
# CONFIG_STM32_TCMEXCLUDE - Exclude TCM SRAM from the HEAP. You would need
|
# CONFIG_STM32_CCMEXCLUDE - Exclude CCM SRAM from the HEAP. You would need
|
||||||
# to do this if DMA is enabled to prevent non-DMA-able TCM memory from
|
# to do this if DMA is enabled to prevent non-DMA-able CCM memory from
|
||||||
# being a part of the stack.
|
# being a part of the stack.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
*
|
*
|
||||||
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
||||||
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
||||||
* 3) 64Kb of TCM SRAM beginning at address 0x1000:0000
|
* 3) 64Kb of CCM SRAM beginning at address 0x1000:0000
|
||||||
*
|
*
|
||||||
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
||||||
* where the code expects to begin execution by jumping to the entry point in
|
* where the code expects to begin execution by jumping to the entry point in
|
||||||
|
|||||||
@@ -121,10 +121,10 @@ CONFIG_STM32_JTAG_NOJNTRST_ENABLE=n
|
|||||||
CONFIG_STM32_JTAG_SW_ENABLE=n
|
CONFIG_STM32_JTAG_SW_ENABLE=n
|
||||||
|
|
||||||
#
|
#
|
||||||
# On-chip TCM SRAM configuration
|
# On-chip CCM SRAM configuration
|
||||||
#
|
#
|
||||||
# CONFIG_STM32_TCMEXCLUDE - Exclude TCM SRAM from the HEAP. You would need
|
# CONFIG_STM32_CCMEXCLUDE - Exclude CCM SRAM from the HEAP. You would need
|
||||||
# to do this if DMA is enabled to prevent non-DMA-able TCM memory from
|
# to do this if DMA is enabled to prevent non-DMA-able CCM memory from
|
||||||
# being a part of the stack.
|
# being a part of the stack.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
*
|
*
|
||||||
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
||||||
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
||||||
* 3) 64Kb of TCM SRAM beginning at address 0x1000:0000
|
* 3) 64Kb of CCM SRAM beginning at address 0x1000:0000
|
||||||
*
|
*
|
||||||
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
||||||
* where the code expects to begin execution by jumping to the entry point in
|
* where the code expects to begin execution by jumping to the entry point in
|
||||||
|
|||||||
@@ -121,13 +121,13 @@ CONFIG_STM32_JTAG_NOJNTRST_ENABLE=n
|
|||||||
CONFIG_STM32_JTAG_SW_ENABLE=n
|
CONFIG_STM32_JTAG_SW_ENABLE=n
|
||||||
|
|
||||||
#
|
#
|
||||||
# On-chip TCM SRAM configuration
|
# On-chip CCM SRAM configuration
|
||||||
#
|
#
|
||||||
# CONFIG_STM32_TCMEXCLUDE - Exclude TCM SRAM from the HEAP. You would need
|
# CONFIG_STM32_CCMEXCLUDE - Exclude CCM SRAM from the HEAP. You would need
|
||||||
# to do this if DMA is enabled to prevent non-DMA-able TCM memory from
|
# to do this if DMA is enabled to prevent non-DMA-able CCM memory from
|
||||||
# being a part of the stack.
|
# being a part of the stack.
|
||||||
#
|
#
|
||||||
CONFIG_STM32_TCMEXCLUDE=y
|
CONFIG_STM32_CCMEXCLUDE=y
|
||||||
|
|
||||||
#
|
#
|
||||||
# On-board FSMC SRAM configuration
|
# On-board FSMC SRAM configuration
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
*
|
*
|
||||||
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
||||||
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
||||||
* 3) 64Kb of TCM SRAM beginning at address 0x1000:0000
|
* 3) 64Kb of CCM SRAM beginning at address 0x1000:0000
|
||||||
*
|
*
|
||||||
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
||||||
* where the code expects to begin execution by jumping to the entry point in
|
* where the code expects to begin execution by jumping to the entry point in
|
||||||
|
|||||||
@@ -121,10 +121,10 @@ CONFIG_STM32_JTAG_NOJNTRST_ENABLE=n
|
|||||||
CONFIG_STM32_JTAG_SW_ENABLE=n
|
CONFIG_STM32_JTAG_SW_ENABLE=n
|
||||||
|
|
||||||
#
|
#
|
||||||
# On-chip TCM SRAM configuration
|
# On-chip CCM SRAM configuration
|
||||||
#
|
#
|
||||||
# CONFIG_STM32_TCMEXCLUDE - Exclude TCM SRAM from the HEAP. You would need
|
# CONFIG_STM32_CCMEXCLUDE - Exclude CCM SRAM from the HEAP. You would need
|
||||||
# to do this if DMA is enabled to prevent non-DMA-able TCM memory from
|
# to do this if DMA is enabled to prevent non-DMA-able CCM memory from
|
||||||
# being a part of the stack.
|
# being a part of the stack.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
*
|
*
|
||||||
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
||||||
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
||||||
* 3) 64Kb of TCM SRAM beginning at address 0x1000:0000
|
* 3) 64Kb of CCM SRAM beginning at address 0x1000:0000
|
||||||
*
|
*
|
||||||
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
||||||
* where the code expects to begin execution by jumping to the entry point in
|
* where the code expects to begin execution by jumping to the entry point in
|
||||||
|
|||||||
@@ -121,10 +121,10 @@ CONFIG_STM32_JTAG_NOJNTRST_ENABLE=n
|
|||||||
CONFIG_STM32_JTAG_SW_ENABLE=n
|
CONFIG_STM32_JTAG_SW_ENABLE=n
|
||||||
|
|
||||||
#
|
#
|
||||||
# On-chip TCM SRAM configuration
|
# On-chip CCM SRAM configuration
|
||||||
#
|
#
|
||||||
# CONFIG_STM32_TCMEXCLUDE - Exclude TCM SRAM from the HEAP. You would need
|
# CONFIG_STM32_CCMEXCLUDE - Exclude CCM SRAM from the HEAP. You would need
|
||||||
# to do this if DMA is enabled to prevent non-DMA-able TCM memory from
|
# to do this if DMA is enabled to prevent non-DMA-able CCM memory from
|
||||||
# being a part of the stack.
|
# being a part of the stack.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
*
|
*
|
||||||
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
||||||
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
||||||
* 3) 64Kb of TCM SRAM beginning at address 0x1000:0000
|
* 3) 64Kb of CCM SRAM beginning at address 0x1000:0000
|
||||||
*
|
*
|
||||||
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
||||||
* where the code expects to begin execution by jumping to the entry point in
|
* where the code expects to begin execution by jumping to the entry point in
|
||||||
|
|||||||
@@ -432,11 +432,11 @@ reference in case you choose to add some.
|
|||||||
Configuration Options
|
Configuration Options
|
||||||
---------------------
|
---------------------
|
||||||
Internal SRAM is available in all members of the STM32 family. The F4 family
|
Internal SRAM is available in all members of the STM32 family. The F4 family
|
||||||
also contains internal TCM SRAM. This SRAM is different because it cannot
|
also contains internal CCM SRAM. This SRAM is different because it cannot
|
||||||
be used for DMA. So if DMA needed, then the following should be defined
|
be used for DMA. So if DMA needed, then the following should be defined
|
||||||
to exclude TCM SRAM from the heap:
|
to exclude CCM SRAM from the heap:
|
||||||
|
|
||||||
CONFIG_STM32_TCMEXCLUDE : Exclude TCM SRAM from the HEAP
|
CONFIG_STM32_CCMEXCLUDE : Exclude CCM SRAM from the HEAP
|
||||||
|
|
||||||
In addition to internal SRAM, SRAM may also be available through the FSMC.
|
In addition to internal SRAM, SRAM may also be available through the FSMC.
|
||||||
In order to use FSMC SRAM, the following additional things need to be
|
In order to use FSMC SRAM, the following additional things need to be
|
||||||
@@ -459,19 +459,19 @@ There are 4 possible SRAM configurations:
|
|||||||
Configuration 1. System SRAM (only)
|
Configuration 1. System SRAM (only)
|
||||||
CONFIG_MM_REGIONS == 1
|
CONFIG_MM_REGIONS == 1
|
||||||
CONFIG_STM32_FSMC_SRAM NOT defined
|
CONFIG_STM32_FSMC_SRAM NOT defined
|
||||||
CONFIG_STM32_TCMEXCLUDE defined
|
CONFIG_STM32_CCMEXCLUDE defined
|
||||||
Configuration 2. System SRAM and TCM SRAM
|
Configuration 2. System SRAM and CCM SRAM
|
||||||
CONFIG_MM_REGIONS == 2
|
CONFIG_MM_REGIONS == 2
|
||||||
CONFIG_STM32_FSMC_SRAM NOT defined
|
CONFIG_STM32_FSMC_SRAM NOT defined
|
||||||
CONFIG_STM32_TCMEXCLUDE NOT defined
|
CONFIG_STM32_CCMEXCLUDE NOT defined
|
||||||
Configuration 3. System SRAM and FSMC SRAM
|
Configuration 3. System SRAM and FSMC SRAM
|
||||||
CONFIG_MM_REGIONS == 2
|
CONFIG_MM_REGIONS == 2
|
||||||
CONFIG_STM32_FSMC_SRAM defined
|
CONFIG_STM32_FSMC_SRAM defined
|
||||||
CONFIG_STM32_TCMEXCLUDE defined
|
CONFIG_STM32_CCMEXCLUDE defined
|
||||||
Configuration 4. System SRAM, TCM SRAM, and FSMC SRAM
|
Configuration 4. System SRAM, CCM SRAM, and FSMC SRAM
|
||||||
CONFIG_MM_REGIONS == 3
|
CONFIG_MM_REGIONS == 3
|
||||||
CONFIG_STM32_FSMC_SRAM defined
|
CONFIG_STM32_FSMC_SRAM defined
|
||||||
CONFIG_STM32_TCMEXCLUDE NOT defined
|
CONFIG_STM32_CCMEXCLUDE NOT defined
|
||||||
|
|
||||||
Configuration Changes
|
Configuration Changes
|
||||||
---------------------
|
---------------------
|
||||||
@@ -557,7 +557,7 @@ STM32F4Discovery-specific Configuration Options
|
|||||||
|
|
||||||
CONFIG_DRAM_END=(CONFIG_DRAM_START+CONFIG_DRAM_SIZE)
|
CONFIG_DRAM_END=(CONFIG_DRAM_START+CONFIG_DRAM_SIZE)
|
||||||
|
|
||||||
CONFIG_STM32_TCMEXCLUDE - Exclude TCM SRAM from the HEAP
|
CONFIG_STM32_CCMEXCLUDE - Exclude CCM SRAM from the HEAP
|
||||||
|
|
||||||
In addition to internal SRAM, SRAM may also be available through the FSMC.
|
In addition to internal SRAM, SRAM may also be available through the FSMC.
|
||||||
In order to use FSMC SRAM, the following additional things need to be
|
In order to use FSMC SRAM, the following additional things need to be
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
*
|
*
|
||||||
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
||||||
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
||||||
* 3) 64Kb of TCM SRAM beginning at address 0x1000:0000
|
* 3) 64Kb of CCM SRAM beginning at address 0x1000:0000
|
||||||
*
|
*
|
||||||
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
||||||
* where the code expects to begin execution by jumping to the entry point in
|
* where the code expects to begin execution by jumping to the entry point in
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
*
|
*
|
||||||
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
||||||
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
||||||
* 3) 64Kb of TCM SRAM beginning at address 0x1000:0000
|
* 3) 64Kb of CCM SRAM beginning at address 0x1000:0000
|
||||||
*
|
*
|
||||||
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
||||||
* where the code expects to begin execution by jumping to the entry point in
|
* where the code expects to begin execution by jumping to the entry point in
|
||||||
|
|||||||
Reference in New Issue
Block a user