cancel
Showing results for 
Search instead for 
Did you mean: 

IAP Issue rebooting with other flash address

ramasubbu
Associate II
Posted on November 16, 2017 at 13:01

Hi,

For IAP of STM32F407

I am using mikro C pro arm compiler

After written my downloaded application to the flash address from (0x08080000)

am trying to reboot from that address but its does n't work

the below steps i have done

1,I have changed the vector table offset to that address 2,I have changed the stack pointer to that address 3,Switching that address through function pointer Below i have attached that part of code

Code:

https://forum.mikroe.com/viewtopic.php?f=178&t=71218


typedef void (*pEntryFunPtr)(void) ;
pEntryFunPtr pJumpAddress = NULL ;
uint32_t * const vtableoffsetptr = 0xE000ED08 ;
uint8_t FLash_Reboot_IAP(uint32_t ui32StAdd){

 uint32_t uiVt1 ;
 char ucTempArray[20] = '\0' ;
 if(vtableoffsetptr != NULL){
 // relocate the vector table address
 UART6_Write_Text('\r\n Application Rebooting ...');
 
 uiVt1 = (ui32StAdd & 0xfffff ) << 9 ;
 *vtableoffsetptr |= uiVt1 ;
 pJumpAddress = (pEntryFunPtr)(ui32StAdd) ;
 SP = ui32StAdd ;
 pJumpAddress();
 }
 return FALSE ;
}

0 REPLIES 0