NUCLEO-N657X0-Q ethernet DMA issue
- April 16, 2026
- 2 replies
- 217 views
Hello ST community,
I configured my project in STM32CubeMX 6.17.0 and use STM32CubeIDE 2.1.1 to debug.
The goal of the program is to receive a raw ethernet frame.
I followed this tutorial, of course I adapted the pins to NUCLEO-N657X0-Q, and I skipped the part with the transmission, I didn't change anything in the HAL_ETH functions.
I am sending from the PC (I can see that the frame is sended with wireshark):
from scapy.layers.l2 import Ether
from scapy.packet import Raw
from scapy.sendrecv import sendp
#Terminal ipconfig /all
dst_mac = "00:80:E1:00:00:00"
src_mac = "AA:79:39:37:92:EA"
payload = bytes([0x01] * 86)
frame = Ether(dst=dst_mac, src=src_mac, type=0x88B5)/Raw(payload)
sendp(frame, iface="Intel(R) Ethernet Connection (13) I219-LM", verbose=True)I placed a breakpoint in :
void HAL_ETH_RxCpltCallback(ETH_HandleTypeDef * heth)
{
}This callback should be executed when an Ethernet packet is received, but it never happened.
I also tried by defining USE_HAL_ETH_REGISTER_CALLBACKS 1U in stm32n6xx_hal_conf.h.
Thankfully at the end of the tutorial, there are debugging tips, which led me to conclude that the PHY link is up and correctly initialized.
The Debug status register (ETH_DMADSR) has the value 0x40400, that means the Rx descriptors for both channels are in suspended state, that they are not available.
The SR bit of DMAC0RXCR is set and so indicates that DMA tries to acquire the descriptor from the receive list and processes the incoming packets.
The CDE bit of DMAC0SR (channel 0 status register) is equal 0x0, that indicates that the DMA Rx engine didn't face a descriptor error.
The value of ETH_DMADescTypeDef *dmarxdesc (the address of the descriptor) is the same as the DMAC0CARXPR the register that contains the address of the current application receive descriptor.
I noticed that I couldn't find in the linker script STM32N657X0HXQ_AXISRAM2_fsbl.ld under section .RxDecripSection and .TxDecripSection. Is it normal ?
ETH_DMADescTypeDef DMARxDscrTab[ETH_DMA_RX_CH_CNT][ETH_RX_DESC_CNT] __attribute__((section(".RxDecripSection"))); /* Ethernet Rx DMA Descriptors */
ETH_DMADescTypeDef DMATxDscrTab[ETH_DMA_TX_CH_CNT][ETH_TX_DESC_CNT] __attribute__((section(".TxDecripSection"))); /* Ethernet Tx DMA Descriptors */
I would appreciate if someone know a bit more about that kind of issue.
Thank you!
