Question
Computation Results are Rubbish if Variable in CCM
Posted on October 02, 2014 at 18:15
The strangest thing is happening.
I do some DSP computation on float arrays with the CMSIS library, especially arm_fir_decimate_f32 on an STM32F407VG. I use CooCox. As my need for RAM grew, I decided to relocate some arrays into the CCM. No big deal, I modified the linker script by adding:.ccm :
{ .= ALING(4); *(.ccm) .= ALIGN(4); } > CCMRAM And I placed a variablefloat32_t workspace_f32[4096];
in the Core Coupled Memory withfloat32_t workspace_f32[4096] __attribute__ ((section (''.ccm'')));
Everything compiles and links nicely, no problem. For the FIR decimation I got 3 float array in the RAM, the input signal, the output signal and the state buffer. I can move the arrays for the state buffer and the input signal to the CCM and everything works as before (except from cycles needed for the computation of course). But when I move output buffer array to the CCM, its contents are complete rubbish and entirely different from what they're supposed to be. How on earth is this possible? Regards, Julian #ccm-dsp-cmsis-m4-stm32f4-coocox