LPC1768 to interface with ksz8863 and lwip

cancel
Showing results for 
Search instead for 
Did you mean: 

LPC1768 to interface with ksz8863 and lwip

608 Views
Contributor II

Hi

When LPC1768 , as a reference design , it works with lwip tcp example fine.

a udp example can send and receive data from windows app.

We connected a 3 port switch , ksz8863  from microchip , to LPC1768 and the udp is not working.

The status is:

1. There is a link to the switch, it can be read via the same code that reads the phy registers ( mdio and mdc are func1)

2. we can access using bit bang , smi and mii to the chip ( change mdio and mdc to gpio - func0)

3. we tried to use mac mode in the switch rather then phy more , both not working.

Does any one connected to any micro controller a Ethernet switch and worked with lwip?

does it require any changes in the code?

Do we need to configure the switch to work in phy more or mac mode ( just to be sure)

The question can be directly for LPC1768 + ksz8863 + lwip + udp 

but also for any micro controller ->  port switch -> lwip + udp.

Any information is welcome,

Thank you.

Labels (2)
1 Reply

63 Views
Contributor II

We found the problem

in  emac_config.h 

there is PHY ADDRESS

/* The PHY address connected the to MII/RMII */
#define LPC_PHYDEF_PHYADDR 3

the phy address should be 3 

because the switch has 3 ports , where there the MII is connected to port 3 now 

it was connected to port 1 in the reference design

This is the only change that should be done,