Skip to main content
Associate
June 11, 2026
Question

How can I switch the Ethernet from ETH0 (LAN8670) to ETH1 (LAN8650 based on SPI) in AEK-COM-10BASET?

  • June 11, 2026
  • 1 reply
  • 34 views

Hello,

 

I am experiencing some issues when using ETH0 (LAN8670). As a test I want to use ETH1 to use LAN8650 via SPI communication.

 

How can I use ETH1 when calling FreeRTOS_recvfrom(), FreeRTOS_sendto(), etc?

 

I changed SPC5_USE_ETH0 as FALSE and SPC5_USE_ETH1 as TRUE but still I can’t use ETH1, I do not see any packet from ETH1’s port of Evaluation board via Wireshark in the connected PC.

 

Questions;

  • Is there additional #define to change if I want to use ETH1 (through SPI) but not ETH0 (through MAC)?
  • Or do I need to call different FreeRTOS API functions?

 

Currently I am calling some Ethernet related functions like below.

 


 

UdpRxInfo.xRXSocket = FreeRTOS_socket(FREERTOS_AF_INET, FREERTOS_SOCK_DGRAM, FREERTOS_IPPROTO_UDP);
 
FreeRTOS_setsockopt(UdpRxInfo.xRXSocket, 0, FREERTOS_SO_RCVTIMEO, &xReceiveTimeOut, sizeof(xReceiveTimeOut));
 
UdpRxInfo.xBindAddress.sin_addr = FreeRTOS_inet_addr("192.168.0.22"); // use Specific IP to receive
UdpRxInfo.xBindAddress.sin_port = FreeRTOS_htons(XcpPortNum);         // use Specific Port to receive
FreeRTOS_bind(UdpRxInfo.xRXSocket, &UdpRxInfo.xBindAddress, sizeof(UdpRxInfo.xBindAddress));

 

socklen_t xAddressLength = sizeof( xBindAddress );

 

// RX

int nRet = FreeRTOS_recvfrom(
        xSocket,
        rx_buffer,
        sizeof(rx_buffer),
        0,
        &xBindAddress, //NULL,
        &xAddressLength //NULL
    );
 
// TX
FreeRTOS_sendto(
        xSocket,
        tx_payload,
        uTxLen,
        0,
        &xBindAddress,
        sizeof(xBindAddress)
    );

 

 

1 reply

Associate
June 11, 2026

SPC5_ETH0_PLCA_NCNT and SPC5_ETH1_PLCA_NCNT parameters are identical to each other and have been set at 2, as the two transceivers are the only components fo the point-to-point network implemented in our demo. The classic PHY transceiver is the coordinator, whose PLCA Node ID corresponds to SPC5_ETH0_PLCA_ID set at 0. The MAC-PHY transceiver is the follower, whose PLCA Node ID corresponds to SPC5_ETH1_PLCA_ID set at 1. To change the network configuration (for example, to implement a multidrop topology), you have to change the parameter values described above in the "network_cfg.h" file.

apapAuthor
Associate
June 16, 2026

Hello,

 

I want to use LAN8650 (SPI) based Ethernet communication. I changed SPC5_USE_ETH0 as FALSE and keep SPC5_USE_ETH as TRUE and tested but not working. From the P2 (for LAN8650) no response ETH packet is found.

 

Can I disable the ETH for LAN8670 and use LAN8650 only? The SW will communicate with other node to perform some TX/RX actions.

 

Associate
June 17, 2026

You may refer to UM3460 for 10BASE-T1S software driver implementation on MAC/PHY Initialization