Skip to content

[W5500] STM32 H743 driver W5500 for UDP delivery

[W5500] STM32 H743 driver W5500 for UDP delivery

WIZnet

Published October 04, 2022

Original author: ProgrammerSoughtOriginal source (new tab)

[W5500] STM32 H743 driver W5500 for UDP delivery

Project description

Prospect

STM32 H743 is really a good chip, but this MAC is only a truth that I don't think it is enough. I want to play the a nuclear chip of the whole pair of Mac, but what is really uncomfortable to get Linux, although IMX6ULL is also a good chip. . . .

There are a lot of scenarios plus Mac, and finally I chose W5500 ...
The SPI is still ok, that is, the speed pulls, but even if the 10M Ethernet is very good, compared to the serial port, CAN
100M does not expect, this SPI should not run so high speed, have met the demand.

Actual operation

Chip: STM32H743VIT6 core board
X Baozhang W5500 module
Draw a bottom plate yourself, don't want to use DuPont line, because DuPont is not very reliable

CUBEMX settings

Clock settings

Note that my core board is 25M crystal
[W5500] STM32 H743 driver W5500 for UDP delivery, Clock settings

Pins and peripherals

I use the SPI3 here, I don't say it, I will give the module at an extra:

  1. RST reset pin
  2. INT external interrupt pin [It doesn't know if there is any use of IO library]
  3. Child selection CS [this must! ! 】
    Pins and peripherals
    Not much to say peripherals
    W5500 seems to be too fast, 30M may be the biggest I see the tutorial
    I am watching this tutorial and I have a bit span, a little difference.
    Pins and peripherals

Adapted to H743 and W5500, build project

Then generate a CubemX IDE project
Then follow the Tutorial to go to Github's official IO library up and down the W5500, then add a good reference relationship.
The adaptation is very simple is to dock several function pointers
Simple, I am a naked machine environment
Adapted to H743 and W5500, build project
Basically, the docking of the IO library is on two files on the green
According to the requirements of the SPI need to make the SPI, register to its IO library
Accommodate my code
Show results

Ping Tong
Adapted to H743 and W5500, build project
UDP communication OK
Adapted to H743 and W5500, build project

The implementation effect of W5500 to common UDP port numbers and IP bindings

This kind of scene is to open two sockets
The implementation effect of W5500 to common UDP port numbers and IP bindings

This scene is also to open two sockets
The implementation effect of W5500 to common UDP port numbers and IP bindings

This can be opened, but the IP port number of the received UDP data should be judged, respectively, because the same local port number is the same, the remote IP port number is different, maybe if the remote IP is different, port Same, this is also applicable
The implementation effect of W5500 to common UDP port numbers and IP bindings

Comments

Similar projects you might like

Comments