Vectors table was not correctly relocated on STM32F4
This commit is contained in:
+7
-5
@@ -259,7 +259,7 @@
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "stm32f4xx.h"
|
#include "../../Include/stm32f4xx.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
@@ -293,9 +293,9 @@
|
|||||||
through STLINK MCO pin of STM32F103 microcontroller. The frequency cannot be changed
|
through STLINK MCO pin of STM32F103 microcontroller. The frequency cannot be changed
|
||||||
and is fixed at 8 MHz.
|
and is fixed at 8 MHz.
|
||||||
Hardware configuration needed for Nucleo Board:
|
Hardware configuration needed for Nucleo Board:
|
||||||
– SB54, SB55 OFF
|
� SB54, SB55 OFF
|
||||||
– R35 removed
|
� R35 removed
|
||||||
– SB16, SB50 ON */
|
� SB16, SB50 ON */
|
||||||
/* #define USE_HSE_BYPASS */
|
/* #define USE_HSE_BYPASS */
|
||||||
|
|
||||||
#if defined (USE_HSE_BYPASS)
|
#if defined (USE_HSE_BYPASS)
|
||||||
@@ -451,7 +451,9 @@ void SystemInit(void)
|
|||||||
#ifdef VECT_TAB_SRAM
|
#ifdef VECT_TAB_SRAM
|
||||||
SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */
|
SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */
|
||||||
#else
|
#else
|
||||||
SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */
|
// SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */
|
||||||
|
extern uint32_t g_pfnVectors ;
|
||||||
|
SCB->VTOR = (uint32_t) &g_pfnVectors ; /* Vector Table Relocation in Internal FLASH */
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user