Skip to main content

aen-ethernet-link

Bring up the Alif Ensemble E8 GMAC Ethernet and report net-interface state. BENCH-VERIFIED on E8 — DHCP lease acquired, confirmed server-side (dnsmasq lease + ARP REACHABLE).

Source: examples/aen/aen-ethernet-link/.

What it does​

  1. Powers the PHY and brings up the GMAC (eth_dwmac + the SDK's alif,ethernet glue) over RMII.
  2. Reports net_if state via the Zephyr networking API and waits for a DHCP lease.

The key correctness fact: the GMAC DMA descriptor rings and the net_buf pool must sit in global SRAM0 (CPU address == DMA address) with CONFIG_DCACHE=n. In the M55 DTCM — the default — they are off the GMAC DMA bus and the link never comes up. A BUILD_ASSERT rejects the silent cache-incoherent combination. The verified bench clock path is the external 50 MHz RMII oscillator.

Changed in alp-sdk v0.17.0: only the Ethernet buffers move to SRAM0

The first working overlay moved all of main RAM to SRAM0 (chosen { zephyr,sram = &sram0; }) — simple, but slower than DTCM for everything else, and it intermittently broke the ISP. Main RAM now stays on DTCM, and only the Ethernet-owned buffers move: the descriptor rings through the ethernet node's memory-region = <&sram0>; (in the SoC devicetree), and the net_buf pool through CONFIG_ETH_DWMAC_ALIF_NET_BUF_IN_DMA_REGION (default y). Silicon-verified on an E1M-AEN803: DHCP lease, PHY link up, host ping 5/5. The E1M-AEN801 is build-verified only.

  • Limit: only the networking stack's own net_buf pools are relocated. An app-declared pool would still land on DTCM, and the DMA would silently fail against it.
  • Hazard: do not also point chosen { zephyr,sram = ...; } back at SRAM0 while the ethernet node's memory-region is set — main RAM and the DMA buffers would land in the same address window. The SDK's CMake refuses that combination at configure time.

Build​

aen-ethernet-link has no board.yaml: it is a standalone Zephyr bench app with per-board overlays under boards/. See the example's README.md for the build commands.

Expected output​

Abridged; every line carries the [eth] prefix:

[eth] PHY powered early (SYS_INIT pri 50, before the eth refclk probe)
[eth] RMII refclk source = EXTERNAL osc (PHY clocked -- power-enable worked) (ETH_CTRL bit4=0)
[eth] net_if_up -> 0
[eth] PHY link UP after N ms (BMSR=.... ANLPAR=....)
[eth] DHCP lease = <leased-ip>
[eth] RESULT PASS: wire link UP + DHCP lease acquired = Ethernet fully WORKING
[eth] done

See also​

Questions about this page? Email contact@alplab.ai