cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H723ZGT6 Ethernet only works when J-Link USB interface is connected to board

CCP
Associate II

We have developed a custom board based on an eval board that has a LoRa transceiver and an RFID tag reader connected to two UARTs of the MCU. A serial console is also connected to a third UART. DMA streams are configured for the LoRa and RFID UARTs, and for Ethernet. The software application uses FreeRTOS and has an Ethernet stack implemented using LwIP. The app responds to UDP commands received by the device, which trigger interactions with the LoRa or RFID devices.

The application works as expected when a USB J-Link JTAG interface is connected to the board, whether using the debugger, or just running. However, if the board is powered on without the USB J-Link attached, Ethernet does not work. The board does not receive any UDP packets or even respond to pings. The LEDs still flash, indicating that the main thread is still running.

Any suggestions?

 

14 REPLIES 14
STackPointer64
ST Employee

Hello @CCP

Could you please attach your STM32CubeMX configuration file (.ioc) so I can review it? If the project is private, feel free to send it to me privately.

Best regards,

To improve visibility of answered topics, please click 'Accept as Solution' on the reply that resolved your issue or answered your question.
CCP
Associate II

Ethernet started working today with no J-Link connected. I've gone over my diffs, but I can't see any change that could be responsible. I backed out all the changes I made since my last attempt, when Ethernet did not work unless J-Link was connected.

I disabled the Eth and RCC register dumps that run in the main thread's loop, and Ethernet stopped working. After enabling only the ETH register reads (no dump), Ethernet works. 

STackPointer64
ST Employee

Hello,

That sounds unusual and quite unsatisfying. Aside from the files, have you made any changes to the PCB? Have you tried using other hardware for testing? Did you change or update the IDE to a newer version? Have you tried opening the project in a different working environment? Any small change could help us pinpoint the cause.

Best regards,

To improve visibility of answered topics, please click 'Accept as Solution' on the reply that resolved your issue or answered your question.

Hi, no changes to PCB, no other hardware, no IDE changes, no environment change.

I think I'll disable the ETH register dump and use my console messages to pinpoint where it fails - are there any ETH interrupts that indicate a DMA transfer should start, etc. I was previously looking only at what happened after a DMA completion and the received data was copied from the buffer, after the semaphore that hands over control to the Ethernet stack.

Hello, the information you're looking for can be found in the Debug Status Register (ETH_DMADSR); it contains the status for both Tx and Rx DMA channels.

 
To improve visibility of answered topics, please click 'Accept as Solution' on the reply that resolved your issue or answered your question.