SysTick is not triggering after shifting the Interrupt Vector Table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-10-30 2:23 AM
Hello Everyone,
I am using STM32F030CCT6TR microcontroller for Bootloader application. But as the mentioned controller is cortex M0+ , I directly can't change the interrupt vector table address myself using VTOR.
So, I am copying the interrupt vector table from Flash memory to RAM and calling it when Application is running from the Bootloader.
All the Interrupt are getting triggered expect for Sys Tic(),
So Please help me with above problem.
Below is function i am using for the same.
void goto_application(void)
{
void (*app_reset_handler)(void) = (void*)(*((volatile uint32_t*) (ETX_APP_FLASH_ADDR + 4U)));
deinitEverything();
app_reset_handler(); //call the app reset handler
}
void deinit Everything(void)
{
__HAL_RCC_GPIOC_CLK_DISABLE();
__HAL_RCC_GPIOD_CLK_DISABLE();
__HAL_RCC_GPIOB_CLK_DISABLE();
__HAL_RCC_GPIOA_CLK_DISABLE();
HAL_RCC_DeInit();
HAL_DeInit();
SysTick->CTRL = 0;
SysTick->LOAD = 0;
SysTick->VAL = 0;
HAL_SuspendTick();
}
Calling the
HAL_ResumeTick(); and HAL_Init(); after jumping to the Application.
Using the below line of code for copying the Interrupt Vector table from flash memory to RAM.
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-10-31 2:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-10-30 5:50 AM
The most important parts of your code are missing: copying the exception table and mapping RAM at 0. These must be done before jumping to the app code. Also, I cannot see the stack pointer setting in your code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-10-30 5:58 AM
The STM32F0 is a CM0, not a CM0+ device
You need to carve out 192 / 0xC0 space at 0x20000000 (RAM), memcpy the 192 bytes from your new vector table in Flash over to the 0x20000000 space, then remap RAM into the zero space instead of FLASH
I'm sure there are actual examples posted in the forum.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-10-31 2:19 AM
