Hello
my LPC board setup as an Ethernet transmitter is constantly sending out 0x55 (Ethernet preamble), I'm writing the frame to the transmit buffer using the in the CMSIS ethernet driver (see below). I observed this using Wireshark after capturing all traffic egressing from the Ethernet transmitter.
/* write frame to transmit buffer */ status_code = eth0_mac->SendFrame(ptr,64,ARM_ETH_MAC_EVENT_TX_FRAME);
The setup consists of x2 LPC4088 boards interconnected via ethernet cables. One set up as an Ethernet transmitter and the other as a receiver. I'm trying to establish only Layer-2 communication between the boards using CMSIS drivers PHY + MAC.
The transmitter seems to constantly send a stream 0x55 (ethernet preamble) every time the application makes a call to the above SendFrame function. This fills up the frame with 1370bytes of 0x55 only !!! The below register on both sides shows there is some communication. What would cause a constant stream of 0x55 to be transmitted? I'd greatly appreciate any pointers please as to what might be happening???
Receiver Internal registers
MAC1 (crcen bit-4) = 00000003 MAC2 (crcen bit-4) = 000000B1 Receive Status register = 01C0055A <----bytes receieved Transmit Status register 0 = 00000000 Transmit Status register 1 = 00000000 COMMAND register = 00000643 STATUS register = 00000001
Transmitter Internal Registers
MAC1 (crcen bit-4) = 00000003 MAC2 (crcen bit-4) = 000000B1 Receive Status register = 00000000 Transmit Status register 0 = 0055A019 Transmit Status register 1 = 0000055A <----bytes transmitted COMMAND register = 00000643 STATUS register = 00000001
Note: I made the below changes to the EMAC_LPC40xx.c file as I'm not running RTOS in the project. The period of tick_val is 1ms.
/* Wait until operation completed */ tick = tick_val; //osKernelSysTick(); do { if ((LPC_EMAC->MIND & MIND_BUSY) == 0) break; } while ((tick_val - tick) <= PHY_TIMEOUT); // < osKernelSysTickMicroSec(PHY_TIMEOUT)); if ((LPC_EMAC->MIND & MIND_BUSY) == 0) { return ARM_DRIVER_OK; }