cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7 Ethernet works on restart and release mode but not on debug

amirshn
Associate III

Hi everyone,

I’m working with a custom board that uses the STM32H733VGT and the LAN8742AI Ethernet PHY. I’ve configured the MPU and middleware following the ST example for the STM32H75_DISCO board. The board responds to ping in release mode and after a watchdog reset in debug mode—but it fails to respond on the first run after flashing or power-up.

Please find attached my .ioc and ETH Init function file in the attachments.

 

Any comment or advice would be highly appreciated.

Tnx,

Amir

 

1 REPLY 1
STackPointer64
ST Employee

Hello @amirshn,

It seems like your issue might be related to MPU configuration or cache handling, which are critical when working with Ethernet RX buffers. Based on your description, it’s possible that incorrect MPU settings are causing data corruption or loss, especially during the first run after flashing or power-up.

  1. MPU Configuration:
    Ensure that the Ethernet RX buffer is configured as non-cacheable or write-through. This prevents cache maintenance operations from discarding data written by the TX process. Misconfigured MPU regions can lead to unpredictable behavior, such as the one you’re experiencing.

  2. Alignment:
    Make sure the MPU region is aligned to the size of the region (e.g., 16kB). Proper alignment is crucial for correct operation.

  3. H723 Reference:
    Since the only difference between the STM32H733VGT and STM32H723 is the crypto module, I recommend using the MPU configuration for the STM32H723 as a reference. You can adapt it to your STM32H733VGT implementation to ensure compatibility. NUCLEO-H723ZG LwIP GitHub

Best regards,