AnsweredAssumed Answered

Code and vector in SRAM

Question asked by eric.b on Feb 17, 2015
Latest reply on Feb 17, 2015 by eric.b
I want to have a fast interrupt with the STM32F429 at 168MHz. I use EXTI interrupt who toggle an gpio for test. I measure the time with a scope between the exti pin front and the gpio output front.
I made 3 test:
1- vector and IRQHandler in flash -> 184ns
2- vector in flash and IRQ handler in sram -> 204ns
3- vector and IRQHandler in sram -> 212ns
I thought that IRQ would be faster in sram. Is it correct?

Here my code:

//#define RAMFUNC __attribute__ ((section (".ramfunctions")))

RAMFUNC void EXTI9_5_IRQHandler(void)
    GPIOH->BSRRL = GPIO_PIN_5;    //set led V
    __HAL_GPIO_EXTI_CLEAR_IT(GPIO_PIN_8);        // pin DE
    GPIOH->BSRRH = GPIO_PIN_5;    //reset led V

I tried to put vectors in CCMram but I have a hardfault.
Is it possible to put the vectors in CCMram?