Using STM32CubeMX to interface KSZ8863 with MII (STM32F207ZG)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-12-15 8:21 AM
Hello All,
I'm interfacing a KSZ8863 (Micrel, 3 Port Switch with 2 PHY and 3 MAC) over MII from a STM32F207ZG. I've used the STM32CubeMX to generate the code with the LwIP Stack and FreeRTOS.
So far, I've successfully communicated over SMI to read/write some registers (just debugging, if the bit-banging is working) and I've done some network stuff (Ping/TCP frame send) through port 1 and 2 (ping and tcp sent from computer on port 1 to a device on port 2).
But I'm not able to communicate correctly over the MII interface and send or receive ethernet packages. I think it has something to do with the Ethernet and LwIP configuration in the STM32CubeMX tool, specifically the register addresses. Here is my configuration so far:
I am absolutly not sure, wich settings I have to change (I couldn't find some parameter documentation about those STM32CubeMX settings).
I've changed:
- the PHY to ''user PHY''
- the PHY name to ''KSZ8863''
- the PHY special control/status register Offset to ''0x5'', because I think, that this address is used to determine the speed and duplex mode
- the PHY Speed mask to ''0x0060'' according to KSZ8863 datasheet
- the PHY Duplex mask to ''0x0140'' according to KSZ8863 datasheet
My application is running in the following steps (main):
- HAL_Init, SystemCock_Config
- Starting up SMI communication to read/write registers (debug), including Reset over Pin and disabling the Bypass Mode (SMTXER3)
- Initialize FreeRTOS
- Start Kernel
Does anybody know how to configure those ethernet settings correctly? Or am I completely on the wrong way for interfacing the KSZ8863?
This is the Datasheet of the
http://ww1.microchip.com/downloads/en/DeviceDoc/00002335B.pdf
.Thanks
Alain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-08-01 12:37 PM
HI Alain,
Im using the same ICs and stuck in configuration.
Can you help if you have figured it out?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-08-29 4:22 AM
@BPadm​ @ame​
I've got a KSZ8081 on my project and I can't even get it to ping (I'm in MII mode). Do you have any example projects that at least ping?
How did you configure the PHY if DP83843 is the only PHY available and the custom PHY does not fit with the datasheet?
