2019-05-13 02:37 AM
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 ?
2019-05-13 02:45 AM
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.
2019-05-13 02:49 AM
any idea other than CRC for checking ?
2019-05-13 05:53 AM
Salted SHA