2012-07-03 12:20 AM
When I was testing DSP efficiency i tried compare how fast is FFT from data from internal SRAM and CCM.
The code looks like this:int16_t
tab[2048]
__attribute__
((section(
''.
ccm
'')));...
GPIO_Pin_high();
arm_cfft_radix4_q15(&S, tab);
arm_cmplx_mag_squared_q15(tab, Output, fftSize);
GPIO_Pin_low();
When the tab was in internal SRAM this code was execute faster. I don't know why. Isn't it shoudl works faster? CCM is memory only for core and it should be the fastest memory. If it's not as fast then what's the reason of using it? #ccm #dsp2012-07-03 03:24 AM
The answer is it depends, the regular SRAM is zero wait state (ie single cycle access), so it can't get faster than that, but the SRAM can be contended by activity external to the core, so if you have a lot of constant DMA (LCD, Ethernet, SD Card, USB, etc) your accesses can be stalled. CCM is slowed when it has to arbitrate with FLASH for the use of the D-Bus. It is also safe from errant DMA access.
There are some CCM vs SRAM benchmarks here : An interesting test might be to do a recursive factorial test, or whatever, where the stack was either in CCM or SRAM.2013-12-15 07:43 AM
When I was testing DSP efficiency i tried compare how fast is FFT from data from internal SRAM and CCM.
The code looks like this:int16_t
tab[2048]
__attribute__
((section(
''.
ccm
'')));...
GPIO_Pin_high();
arm_cfft_radix4_q15(&S, tab);
arm_cmplx_mag_squared_q15(tab, Output, fftSize);
GPIO_Pin_low();
When the tab was in internal SRAM this code was execute faster. I don't know why. Isn't it shoudl works faster? CCM is memory only for core and it should be the fastest memory. If it's not as fast then what's the reason of using it?