AnsweredAssumed Answered

ISR and data from CCMRAM?

Question asked by meyer.joerg.001 on Oct 20, 2015
Latest reply on Oct 20, 2015 by qwer.asdf

On a F303K8 in SysTick i have two functions that i would like to run from CCMRAM because SRAM is
under heavy load from multiple DMA channel transactions, i use EmBitz tools. The functions fetch variables
and data from Flash and SRAM process these and writes result to SRAM buffer from which DMA will
move to a peripheral.

I have this in .ld file but i have not done anything to startup file and an eventual initializer:

CCMRAM (rwx) : ORIGIN = 0x10000000, LENGTH = 4K

_siccmram = LOADADDR(.ccmram);
  .ccmram   :
    . = ALIGN(4);
    _sccmram = .;       /* create a global symbol at ccmram start */

    . = ALIGN(4);
    _eccmram = .;       /* create a global symbol at ccmram end */
  } > CCMRAM

I have tried all kind of things, made simple data test case placed an array from a different file into CCM:
//const uint8_t bell2[768]= {107,108,126,112,,,,,,,,,,};

And map file showed:
 .rodata.bell2      0x00000000      0x300 obj\debug\src\waves.o

Then when try to place in CCMRAM:
uint8_t bell2[768]__attribute__((section(".ccmram")))= {107,108,126,112,,,,,,,,,,};

Then map file showed apparently the right size and linker loaded the array into CCMRAM .:
 .ccmram        0x00000000      0x300 obj\debug\src\waves.o

.ccmram 0x10000000      0x300
                0x10000000                . = ALIGN (0x4)
                0x10000000                _sccmram = .
 .ccmram 0x10000000      0x300 obj\debug\src\waves.o
                0x10000000                bell2
                0x10000300                . = ALIGN (0x4)
                0x10000300                _eccmram = .

But when i run the functions (SysTick ISR in main not attributed) they seams to fetch the
CCM array data but the content is scrambled egg!? Or do the functions do read the
CCM but the array data is not there!?

The SysTick if attributed in main, dont run:
void SysTick_Handler(void) __attribute__ ((section (".ccmram")));

Seams to be loaded in CCMRAM:
.ccmram   0x10000000       0x30
                0x10000000                . = ALIGN (0x4)
                0x10000000                _sccmram = .
 .ccmram  0x10000000       0x10 obj\debug\src\main.o
                0x10000000                SysTick_Handler

What do i have do to make a ISR and data run from CCMRAM?