2015-01-05 08:44 AM
I have relocated the Vector Interrupt Table as follows
*((volatile uint32_t *)0xE000ED08) = 0xFFFFFF00 & 0x08004400; // jump to bootloader pVector = GetBootStartEntry(); asm volatile (''mov pc, %0'' : /* no outputs */ :''r'' (pVector)); It keeps using the old vector table. I have verified that the content of the relocation register (0xE000ED08) has changed from 0x08000000 to 0x08004400. What am I missing? Thanks.2015-01-05 10:31 AM
I have relocated the Vector Interrupt Table as follows
*((volatile uint32_t *)0xE000ED08) = 0xFFFFFF00 & 0x08004400;
// jump to bootloader
pVector = GetBootStartEntry();
asm volatile (''mov pc, %0'' : /* no outputs */ :''r'' (pVector));
It keeps using the old vector table. I have verified that the content of the relocation register (0xE000ED08) has changed from 0x08000000 to 0x08004400. What am I missing? That the first entry is a Stack Pointer? That code you haven't presented does things we don't know?
2015-01-06 08:50 AM
I was just giving a little bit of context to show that after relocating the vector tabl we jump to a relocated application. The stack pointer has been set before this code snippet. The point was that *((volatile uint32_t *)0xE000ED08) = 0x08004400; did not seem to re-map the vector table.
Anyway, in the meantime I have found that one is supposed to use SCB->VTOR, the effective address being 0xE000E008. Yet the Programming Manual on page 206 in table 50 states that the address of VTOR is 0xE000ED08. So the question is why is the dicrepancy there.2015-01-06 09:05 AM
What part exactly are you using?
printf(''SCB->VTOR %08X = %08X\n'', &SCB->VTOR, SCB->VTOR); SCB->VTOR E000ED08 = 08000000 Documentation seems coherent for the STM32F401 That's not to say it isn't shadowed at other addresses, using an RTOS?2015-01-06 11:21 AM
STM32F427ZIT6
// core_cm4.h
#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */
#define SCB ((SCB_Type *)SCB_BASE) /*!< SCB configuration struct */I did not try to print it, but it looks like 0xE000E008.
No RTOS (no printf).What part exactly are you using?
printf(''SCB->VTOR %08X = %08X\n'', &SCB->VTOR, SCB->VTOR); SCB->VTOR E000ED08 = 08000000 Documentation seems coherent for the STM32F401 That's not to say it isn't shadowed at other addresses, using an RTOS?