cancel
Showing results for 
Search instead for 
Did you mean: 

HAL_NVIC_SystemReset() don't work on STM32H755

Domy_ST
Senior

hello ST Community,

I'm developing the bootloader for the STM32H755 microcontroller from a specific flash memory address of 0x08010000. I also modified the USER_VECT_TAB_ADDRESS definition in the file 'system_stm32h7xx_dualcore_boot_cm4_cm7.c', as follows:

/************************* Miscellaneous Configuration ************************/
/* Note: Following vector table addresses must be defined in line with linker
         configuration. */
/*!< Uncomment the following line if you need to relocate the vector table
     anywhere in FLASH BANK1 or AXI SRAM, else the vector table is kept at the automatic
     remap of boot address selected */
#define USER_VECT_TAB_ADDRESS
#define FLASH_BANK1_BASE 0x08010000U


#if defined(USER_VECT_TAB_ADDRESS)
#if defined(CORE_CM4)
/*!< Uncomment the following line if you need to relocate your vector Table
     in D2 AXI SRAM else user remap will be done in FLASH BANK2. */
/* #define VECT_TAB_SRAM */
#if defined(VECT_TAB_SRAM)
#define VECT_TAB_BASE_ADDRESS   D2_AXISRAM_BASE   /*!< Vector Table base address field.
                                                       This value must be a multiple of 0x400. */
#define VECT_TAB_OFFSET         0x00000000U       /*!< Vector Table base offset field.
                                                       This value must be a multiple of 0x400. */
#else
#define VECT_TAB_BASE_ADDRESS   FLASH_BANK2_BASE  /*!< Vector Table base address field.
                                                       This value must be a multiple of 0x400. */
#define VECT_TAB_OFFSET         0x00000000U       /*!< Vector Table base offset field.
                                                       This value must be a multiple of 0x400. */
#endif /* VECT_TAB_SRAM */
#elif defined(CORE_CM7)
/*!< Uncomment the following line if you need to relocate your vector Table
     in D1 AXI SRAM else user remap will be done in FLASH BANK1. */
/* #define VECT_TAB_SRAM */
#if defined(VECT_TAB_SRAM)
#define VECT_TAB_BASE_ADDRESS   D1_AXISRAM_BASE   /*!< Vector Table base address field.
                                                       This value must be a multiple of 0x400. */
#define VECT_TAB_OFFSET         0x00000000U       /*!< Vector Table base offset field.
                                                       This value must be a multiple of 0x400. */
#else
#define VECT_TAB_BASE_ADDRESS   FLASH_BANK1_BASE  /*!< Vector Table base address field.
                                                       This value must be a multiple of 0x400. */
#define VECT_TAB_OFFSET         0x00000000U       /*!< Vector Table base offset field.
                                                       This value must be a multiple of 0x400. */
#endif /* VECT_TAB_SRAM */
#else
#error Please #define CORE_CM4 or CORE_CM7
#endif /* CORE_CM4 */
#endif /* USER_VECT_TAB_ADDRESS */
/******************************************************************************/

 

When the software starts, it starts correctly from address 0x08010000, as per the following build analyzer analysis.

image.png

But when I press reset and then call the function HAL_NVIC_SystemReset(), it doesn't restart. I'm afraid it won't restart from address 0x08010000, I'm afraid I've incorrectly defined USER_VECT_TAB_ADDRESS. What's wrong and what else is missing to make resetting and rebooting from work correctly?

 

thanks for supports

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Super User

Are option bytes set up so that core boots to that address? You will need to change them with STM32CubeProgrammer or similar.

 

> #define FLASH_BANK1_BASE 0x08010000U

This is not correct. Bank 1 starts at 0x08000000.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

1 REPLY 1
TDK
Super User

Are option bytes set up so that core boots to that address? You will need to change them with STM32CubeProgrammer or similar.

 

> #define FLASH_BANK1_BASE 0x08010000U

This is not correct. Bank 1 starts at 0x08000000.

If you feel a post has answered your question, please click "Accept as Solution".