Skip to main content
Arman Ilmak
Senior
October 30, 2021
Question

stm32h7 ethernet works when debugging with keil, else on power up or reset by hand the ethernet doesnt work and i cant understand what the problem is!!

  • October 30, 2021
  • 3 replies
  • 1351 views

..

This topic has been closed for replies.

3 replies

alister
Senior III
October 30, 2021

>else on power up or reset by hand the ethernet doesnt work

Is it only the Ethernet, or does none of your software work on power-on-reset?

A guess: Perhaps when debugging with Keil, it knows your software's entry address and automatically starts executing there. Whereas from POR, the Arm Cortex M7 boots from the address specified in the boot address option bytes (RM 0433 rev 7 section 4.4.7), and your software must either program that on first execution, or you must program it manually using STM32CubeProgrammer GUI or command line.

Arman Ilmak
Senior
October 31, 2021

Nothing is working as you said

Here is the option bytes.

How should i know the start address of my code.

Before this problem the keil debugger started the program when i pushed the run button but now i have to push run button three times till the program starts executing i think it is the issue.

So how to know which address should i put into the boot add0 and boot add1 registers?0693W00000GW0ubQAD.png

alister
Senior III
November 1, 2021

Your comment below that the code executes from POR when MX_LWIP_Init is commented out confirms your application is linked to start at 0x8000000 and your Boot option bytes are ok.

Arman Ilmak
Senior
October 31, 2021

I found that when i use mx_lwip_init in the default task to initialize ethernet the hole program does not work.

even the gpio_pin reset before kernel start does not work,but when i comment this the other codes start to execute correctly

0693W00000GW16IQAT.png

alister
Senior III
November 1, 2021