cancel
Showing results for 
Search instead for 
Did you mean: 

STM32f429 In application programming checking for application vector table ?

Vprabhu
Associate II

In STM32F429 IN application programming i dint get one point where on booting from flash and the custom IAP application checks if there is application in vector table addresses with application address ?

/* Check Vector Table: Test if user code is programmed starting from address

"APPLICATION_ADDRESS" */

if ((((*(__IO uint32_t*)APPLICATION_ADDRESS) & 0xFF000000 ) == 0x20000000) || \

(((*(__IO uint32_t*)APPLICATION_ADDRESS) & 0xFF000000 ) == 0x10000000))

{

  /* Jump to user application */

JumpAddress = *(__IO uint32_t*) (APPLICATION_ADDRESS + 4);

Jump_To_Application = (pFunction) JumpAddress;

/* Initialize user application's Stack Pointer */

__set_MSP(*(__IO uint32_t*) APPLICATION_ADDRESS);

Jump_To_Application();

}

what actually it checks for here with MSB just if the address starts with RAM or CCRAM ?

if so does this enough to judge there is an valid application ? what if i load just an application with 0X20/0X10 at MSB and invalid address ? does IAP takes it as valid ?please any one answer ?

Also here Main stack pointer is set to the RAM end address __set_MSP(*(__IO uint32_t*) APPLICATION_ADDRESS); if i.e same for both IAP application and custom application ( the binary of application which is to be loaded) then how does it not conflict ?

3 REPLIES 3

The checks are very simplistic, basically to see it is not erased/blank, feel free to do more comprehensive testing, perhaps with a CRC or other signing method.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Vprabhu
Associate II

any idea other than CRC for checking ?

Salted SHA

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