Question
Using CCM (or other ram) to store critical functions
Posted on October 23, 2012 at 13:50
Hi.
I am using a STM32F4discoveryboard to prototype an application. In the application, I have some really critical interrupt that must be handled (or else there will be an uncontrolled surge of over 800W through the PCB). The code works, but there is always room for improvement. One of the things I want to improve is to load critical functions and interrupts into SRAM or even CCMRAM. The only thing I am using CCMRAM for right now is the task control blocks of my RTOS. I have unfortunately not been able to do this. I am by the way using Atollic 3.2 My first approach was:void
TIM4_IRQHandler(
void
) __attribute((section(
''.data''
)));
void
TIM4_IRQHandler(
void
) {
...
}
To put the code in SRAM. It appears to work, but there is no speed increase.
If I changed .data into .ccmram, it will just hardfault.
I must admit that I am a bit suprised that there is no example project for this. It seems like such a great feature that appear to be used by very few considering the searchresult on this forum and on google.
Is there someone sitting on an example of having certain functions and ISRs in CCMRAM or SRAM?
Best regards
Martin