Hello @zyt ,
Thank you for the details.
Please also check Pins/Clocks/device_init() accordingly to this thread:
From the screenshot, the GMAC0 interrupt vectors seem to be configured and mapped to the RTD handlers, including GMAC0_CH_0_RX_IRQHandler. Since this handler is sometimes entered and the frame can be received, the basic interrupt routing does not look completely wrong.
However, when using the AUTOSAR Eth_43_GMAC driver, please also check the receive flow above the low-level IRQ handler. The RX interrupt handler itself is not usually the complete application-level receive processing. The application or upper layer still needs to call the expected Eth_43_GMAC receive API flow, for example Eth_43_GMAC_Receive(), so that the received frame is read from the driver and passed further through the configured callback path.
Please check the following points:
1. Please confirm that Eth_43_GMAC_Receive() is called after the RX interrupt event, or periodically from your main/task context, according to your application design. If the interrupt occurs but the received frame is not consumed from the RX buffers, the following frames may not be received as expected.
2. Please verify that the received unicast frame destination MAC address exactly matches the MAC address configured in the GMAC driver. For debug purposes, you can temporarily enable receive-all/promiscuous mode to exclude MAC filtering as the reason.
3. Please check which RX queue/FIFO is used. Your screenshot shows RX interrupt handlers for CH0, CH1, and CH2. If the packet filter or queue configuration routes frames to another RX queue, the application must call the receive function with the corresponding FIFO index and handle that queue correctly.
4. Please verify RX buffer/descriptor availability. After a received frame is processed, the driver must be able to reuse or obtain RX buffers again. If the RX buffers are exhausted, the first frame may be received correctly, but later frames may be delayed or lost.
5. If cache is enabled, please verify that the GMAC descriptors and RX buffers are placed in a non-cacheable memory region, or that the required cache maintenance is performed. Otherwise, the CPU may see stale descriptor status or stale received data.
6. Since the frames are sent from a Python script as unicast frames, please also confirm by Wireshark that the PC really sends the frames continuously with the expected destination MAC address. If some frames require address resolution or if the destination is not reachable as expected, the PC side may introduce retries or delays, which can look like delayed RX interrupt behavior on the MCU side.
As a reference, I would recommend comparing the project with an adapted S32K3 Ethernet/lwIP example first. This can help to confirm that the RGMII PHY interface, clocks, MAC address, and basic RX path are working before focusing on the custom AUTOSAR Eth_43_GMAC interrupt receive implementation.
If the issue still remains, please share the Eth_43_GMAC receive part of the application, especially where Eth_43_GMAC_Receive() is called, the RX FIFO configuration, MAC address/filter configuration, and the GMAC DMA/MTL/MAC status registers after the failure.
Bets regards,
Pavel