Skip to main content
MSadk.2
Associate
January 19, 2023
Question

MCU: STM32F030K6T. remape vector table scince the register VTOR is not availbe on this MCU.

  • January 19, 2023
  • 16 replies
  • 3501 views

MCU: STM32F030K6T. I have the problem remape vector table scince the register VTOR is not availbe on this MCU. I would like to ask how i can remape the vector table on this MCU to one of my application address 0x08001000 or 0x08004800. I have been doing this procces on STM32G030F6P and it was working fine. This is the code for G Type MCU int main(void){

if (IMAGE_1 == *((__IO uint32_t*) SRAM_SELECT_ADDRESS)) {

uint32_t addressImage1 = imageAddress(CONFIG_ADDRESS, IMAGE_1);

SCB->VTOR = addressImage1 + 4;

}

if (IMAGE_2 == *((__IO uint32_t*) SRAM_SELECT_ADDRESS)) {

uint32_t addressImage2 = imageAddress(CONFIG_ADDRESS, IMAGE_2);

SCB->VTOR = addressImage2 + 4;

}

 /* MCU Configuration--------------------------------------------------------*/

platform_start();

HAL_UART_Receive_IT(&huart2, uartRxbuffer, sizeof(uartRxbuffer));

while(1){

// waiting for an interrupt.

}

}

Thanks in advance for your help

This topic has been closed for replies.

16 replies

gbm
Lead III
January 19, 2023

You can't.

You can, however, do something different instead: fiddle a little with the linker script to put the vectors at the start of RAM, then put RAM at address 0.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
MSadk.2
MSadk.2Author
Associate
January 19, 2023

thank you

Wijeden RHIMI
ST Employee
January 20, 2023

Hello@MSadk.2,

I wonder ask you if your issue was resolved or you are stilling blocked :smirking_face:?

I wait your reply.

Best regards,

Wijeden,

MSadk.2
MSadk.2Author
Associate
January 20, 2023

thanks for your quastion!

actually i needed to know if it is possible to go similar to STM32G030F6P.

if you have different solution, it would be nice to recommended.

Wijeden RHIMI
ST Employee
January 20, 2023

Hi again @MSadk.2,

Please check which board exactly you are working with .Because, it seems that is a typing error existing here  'STM32030K6T ' and also if you are switching to use 'STM32G030F6P' board?

I wait your answer.

Wijeden,

MSadk.2
MSadk.2Author
Associate
January 20, 2023

yes i forgot the F STM32F030K6T

Wijeden RHIMI
ST Employee
January 20, 2023

Ok good so you want to use STM32F030K6T board ?

MSadk.2
MSadk.2Author
Associate
January 20, 2023

yes thanks for your answer

Wijeden RHIMI
ST Employee
January 20, 2023

Hi again,

Could you please provide a complete project to help us reproduce your issue and further analyze it .

Wijeden,

MSadk.2
MSadk.2Author
Associate
January 20, 2023

Hi, thanks for your answer. the problem is that VTOR Register is not provided on this MCU STM32F030K6T. here is the problem point in this project.

I made a new projekt and wrote SCB->VTOR = 0x08001000; then i have the problem. My question is if there is any way to make simmlier step to that becuase this register is dose not exist.