cancel
Showing results for 
Search instead for 
Did you mean: 

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!!

Arman Ilmak
Senior
 
5 REPLIES 5
alister
Lead

>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

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

Arman Ilmak
Senior

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

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.