Skip to content

Commit 87f338a

Browse files
committed
Put stack and some data to CCMRAM
CPU can access this data independently without stalling DMA transfers
1 parent 21f5f64 commit 87f338a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

STM32F407VGTx_FLASH.ld

+3-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@
5353
ENTRY(Reset_Handler)
5454

5555
/* Highest address of the user mode stack */
56-
_estack = 0x20020000; /* end of RAM */
56+
/*_estack = 0x20020000;*/ /* end of RAM */
57+
_estack = 0x10010000; /* end of CCRAM */
5758
/* Generate a link error if heap and stack don't fit into RAM */
5859
_Min_Heap_Size = 0x200; /* required amount of heap */
5960
_Min_Stack_Size = 0x400; /* required amount of stack */
@@ -191,7 +192,7 @@ SECTIONS
191192
. = . + _Min_Heap_Size;
192193
. = . + _Min_Stack_Size;
193194
. = ALIGN(8);
194-
} >RAM
195+
} >CCMRAM
195196

196197

197198

Src/usbd_audio_if.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ struct AudioCommand
478478
uint32_t count;
479479
uint8_t sync;
480480
uint8_t cmd;
481-
} audioCommands[2];
481+
} audioCommands[2] __attribute__((section(".ccmram")));
482482
uint8_t cmdReadIdx = 0;
483483
uint8_t cmdWriteIdx = 0;
484484

0 commit comments

Comments
 (0)