cancel
Showing results for 
Search instead for 
Did you mean: 

Startup application for STM32F7 not working?

Posted on June 29, 2018 at 14:52

We are using STM32F767ZIT6 Nucleo board and developing a startup application that jumps to the main application. The main application is a simple toggling LED app with a HAL_Delay API.

By the below startup code we can able to jump to the main application, but after jumping to the main application, we are not able to get any interrupts, this means HAL_Delay API never returns. Please suggest what is missing in our startup code / application.

Code Snippet:

#define SA_START_ADDRESS_UAP 0x08040400

int

main()

{

uint32_t

bootadd ;

 bootadd = SA_START_ADDRESS_UAP;

 BOOT_boot(bootadd);

return

0;

}

void

BOOT_boot(

uint32_t

bootaddress)

{

     

if

(

HAL_OK

!=HAL_RCC_DeInit())

      {

           

while

(1);

      }

  SysTick->

CTRL

= 0;

  SysTick->

LOAD

= 0;

  SysTick->

VAL

= 0;

  __disable_irq();

  SYSCFG->

MEMRMP

= 0x00000001;

 

SCB

->

VTOR

= bootaddress ;

 

/* Reinitialize the Stack pointer and jump to application address */

  JumpAddress = *(__IO

uint32_t

*) (bootaddress + 4);

  Jump_To_Application = (

pFunction

) JumpAddress;

 

/* Initialize user application's Stack Pointer */

  __set_MSP(*(__IO

uint32_t

*) bootaddress);

  Jump_To_Application();

}

3 REPLIES 3
Posted on June 29, 2018 at 17:21

>>By the below startup code we can able to jump to the main application, but after jumping to the main application, we are not able to get any interrupts, this means HAL_Delay API never returns. Please suggest what is missing in our startup code / application.

__disable_irq(); // You do this

Perhaps you should re-enable them on the other side of the worm hole?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on July 09, 2018 at 15:47

I had already enabled the interrupt in the main application , LED glows but it doesn't blink.

This implies that the startup code jumps to the main application but still HAL_Delay API doesn't work.

While debugging the main application to which startup code jumps i found the SCB->VTOR holding the default value of 0x00200000 even though i am setting this to jump address in the startup code as you can see above post.

Afterwards i manually entered the jump address in the SCB->VTOR register in the I/O register window while debugging the main application , I found that it starts blinking , can you suggest how to solve the issue on the basis of above observation?

Posted on July 09, 2018 at 15:54

Perhaps look at SystemInit() in system_stm32f7xx.c. I tend to prefer using the linker to fix up the __Vectors symbol rather than hard code values in source files.

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