Code and vector in SRAM
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-02-17 8:36 AM
Posted on February 17, 2015 at 17:36
Hello,
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 -> 212nsI
thought that
IRQ
would be
faster
insram
. Is it correct? Here my code: //&sharpdefine 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
inCCMram
? Thanks #stm32f4-vectors-in-sram
Labels:
- Labels:
-
STM32F4 Series
This discussion is locked. Please start a new topic to ask your question.
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-02-17 9:13 AM
Posted on February 17, 2015 at 18:13
The ART ''cache'' can deliver cache-line hits to the prefetch port more quickly than SRAM can. SRAM will be more predictable.
The F4 doesn't support execution from CCM, it's on the data port not the instruction port.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-02-17 9:17 AM
Posted on February 17, 2015 at 18:17
You can put your stack in CCM, there it won't be contended for access via DMA, etc.
In most cases I doubt the speed difference would be measurable.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-02-17 9:38 AM
Posted on February 17, 2015 at 18:38
So, I'll leave all in flash.
Thanks for your fast reply.