cancel
Showing results for 
Search instead for 
Did you mean: 

How should I implement the IAP (In-Application Programming) functionality on the STM32F745?

yue9035
Associate

I want to implement a firmware upgrade feature. Currently, I am doing it as follows: on the M4 core, I have a bootloader and an application; on the M7 core, there is also a bootloader and an application. The M4 application is located at address 0x08120000, and the M7 application is located at address 0x08020000. I’m not sure if this approach is feasible or if there is a recommended upgrade method. Currently, the jump between the cores does not succeed, and I don’t know why. Are there any specific considerations when performing a jump between dual-core firmwares? 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @yue9035 and welcome to the community,

You can inspire from this example from Github: https://github.com/STMicroelectronics/STM32CubeH7/tree/master/Projects/STM32H743I-EVAL/Applications/IAP

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

View solution in original post

2 REPLIES 2
yue9035
Associate

I use the following code to jump to the M7 application, and similarly, after changing the address, I use the same method to jump to the M4 application.

#define APPLICATION_M7_ADDRESS 0x08020000

void JumpToApplication(void)

{

__disable_irq();

ApplicationEntry = (pFunction) (*(__IO uint32_t*) (APPLICATION_M7_ADDRESS + 4));

uint32_t appStack = *(__IO uint32_t*) APPLICATION_M7_ADDRESS;

__set_MSP(*(__IO uint32_t*) APPLICATION_M7_ADDRESS);

ApplicationEntry();

}

In the M7 application, I used SCB->VTOR = 0x08020000 to set the interrupt vector offset address. Similarly, in the M4 application, I used SCB->VTOR = 0x08120000 to set the interrupt vector offset address.

Hello @yue9035 and welcome to the community,

You can inspire from this example from Github: https://github.com/STMicroelectronics/STM32CubeH7/tree/master/Projects/STM32H743I-EVAL/Applications/IAP

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.