cancel
Showing results for 
Search instead for 
Did you mean: 

SysTick is not triggering after shifting the Interrupt Vector Table

TShet.2
Associate III

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.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Rim LANDOLSI
ST Employee

Hello @TShet.2 ,

 

I suggest you consult this link . It would be helpful to create a bootloader application.

 

Thanks ,

Rim

View solution in original post

3 REPLIES 3
gbm
Lead III

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.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Rim LANDOLSI
ST Employee

Hello @TShet.2 ,

 

I suggest you consult this link . It would be helpful to create a bootloader application.

 

Thanks ,

Rim