Trouble receiving DHCP packets with ENC28J60 on STM32

Thread Starter

669

Joined Dec 14, 2024
3
I’m testing the ENC28J60 Ethernet controller with an STM32 MCU. Basic SPI communication works fine — I can read and write registers correctly, and static IP configuration works for unicast traffic.

However, DHCP never completes. The broadcast packets don’t seem to be received by the ENC28J60.

According to the ENC28J60 datasheet (Register 8-1, ERXFCON: Ethernet Receive Filter Control Register, p.47–48, ENC28J60 details ), broadcast reception must be explicitly enabled by setting BCEN = 1. In my current configuration I only have UCEN | CRCEN | PMEN enabled, which means broadcast frames like DHCP offers will be filtered out.

Without BCEN set, DHCP offers (broadcast) will be discarded. With BCEN enabled, should I also enable MCEN for ARP broadcasts, or is BCEN alone enough?

Has anyone here implemented DHCP successfully with the ENC28J60 on STM32? Any recommended ERXFCON settings for stable DHCP/ARP handling?

Thanks in advance!
 

eetech00

Joined Jun 8, 2013
4,704
I haven't configured a ENC28J60, but I can tell you that ARP needs to be functioning for ANY IP communications to occur between devices.
 
Top