Skip to main content
Visitor II
November 11, 2024
Solved

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

  • November 11, 2024
  • 1 reply
  • 1653 views

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? 

    This topic has been closed for replies.
    Best answer by mƎALLEm

    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

     

    1 reply

    yue9035Author
    Visitor II
    November 11, 2024

    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.

    mƎALLEmAnswer
    Technical Moderator
    November 11, 2024

    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