AnsweredAssumed Answered

STM32F051 Vector Reclocation

Question asked by FordP on Apr 10, 2015
Latest reply on Apr 13, 2015 by FordP
Hello,

I am planning a both a secondary boot loader and the need for my main application to handle interrupts from RAM during Writing/ Erasing flash.

I think both of these will benefit from relocating the vectors to RAM. I have read up a lot on the subject but the data sheet is not clear.

I am using Keil MDK and I have worked through all the issues I think with this.

I am planning on using this code to switch the Vectors:

    // Enable the SYSCFG peripheral clock
    // RCC_APB2PeriphResetCmd(RCC_APB2Periph_SYSCFG, ENABLE);
    RCC->APB2ENR |= RCC_APB2ENR_SYSCFGEN;
    
    // Remap SRAM at 0x00000000
    //SYSCFG_MemoryRemapConfig(SYSCFG_MemoryRemap_SRAM)
    SYSCFG->CFGR1 = SYSCFG_CFGR1_MEM_MODE_1 | SYSCFG_CFGR1_MEM_MODE_0;

The question I have is what does this actually do?

Is the whole of the 8K ram relocated and what about above this space can the flash still be used???


Where in the data sheet is this information.

Maybe AN4065 and the data sheet can be be updated with better information.

Thanks

FordP


Outcomes