madison-embedded / gcc-builds

For projects built with the GNU toolchain.
GNU General Public License v3.0
11 stars 8 forks source link

STM32 Nucleo 144 F767ZI: Missing Network PHY Driver #7

Closed vkottler closed 7 years ago

vkottler commented 7 years ago

We need to leverage the on-board LAN8742A-CZ-TR (U9) which is connected (by default, is configurable with solder bridges) to the STM32 microcontroller via the RMII interface. A 50 MHz clock for the STM32 microcontroller is generated by the PHY RMII_REF_CLK.

This information was gathered from the STM32 Nucleo 144 User Manual.

It may be a good idea to leverage Wireshark in debugging validity of network traffic being generated.

vkottler commented 7 years ago

Good course of action may be to look at ST's Cube F7 drivers and MBED's implementation.

Ideally a basic MBED program is set up in advance to test the debugging capability of Wireshark on a local network etc.

vkottler commented 7 years ago

Leave JP6 and JP7 on for PHY. LAN8742A-CZ-TR datasheet.

vkottler commented 7 years ago

All development should likely be done with the PHY in loopback mode to start to avoid setting up a complex network debugging envirnoment.

We certainly will need that when working with the dashboard/server parser, but for now loopback should be perfect for debugging the driver. In addition to the oscilloscope!

vkottler commented 7 years ago

^^ before worrying about that, communication (R/W to the 32 registers) with the PHY should be established

vkottler commented 7 years ago

A basic GCC-based MBED application that does a bit of networking (i.e. gets an IP-address) should be exported from the MBED online compiler so we have some working code to trace.

ST's HAL and LL documentation describes their Ethernet implementation starting on page 314.

ST's Cube F7 ships with lwIP (Lightweight TCP/IP stack) which might be something worth adding to the project sooner rather than later so that we don't have to set up our own handshaking etc. once we can send and receive bytes.

They even have a sample project setup in Cube F7 to compile and test some kind of application using this stack with their HAL/LL drivers. From here on out we should all download Cube F7 to have as a reference, it can be downloaded here. Scroll to the bottom of the page and click "Get Software".

As quickly as possible, we should determine if the effort required to stand this driver up would be more than it would to return to MBED or try to incorporate these Cube F7 drivers.

vkottler commented 7 years ago

We can talk to the PHY now