Skip to content

A sample program to use DNS protocol to obtain IP address of a given hostname (domain name)

Notifications You must be signed in to change notification settings

avinash-gupta-in/stm32f051-w5500-dns

Repository files navigation

STM32 W5500 DNS Example

In this example we will use the DNS system to resolve the IP address of a host name (domain name like example.com) and then print it on to the serial terminal. Thats it.

W5500 DNS Example

Hardware Details

w5500 module STM32 Discovery Kit

The code is written to run on a STM32F051 ARM Cortex M0 MCU. The W5500 is attached to the SPI Port and shown in table below.

W5500 STM32
MISO PA6
MOSI PA7
SCLK PA5
SCS PA1
RST PA0
INT NC

NC=No Connection SCS=Chip Select (Active Low)

To view the debug output of the program we need a USB to Serial convertor like FT232RL (3.3V Version only) The debug messages comes out on the TX pin of the USART2 peripheral of the STM32F051. This is PA2. The baud rate is 38400. User RealTerm to view the outputs.

W5500 DNS Example

You will need STM32CubeIDE (Free from ST Microelectronics) to compile, build, flash (burn) and debug this project.

STM32CubeIDE Popup

More information

To learn more about w5500 Ethernet controller and its interface with STM32, please subsribe to our course on Udemy. Udemy's course on W5500 Interfacing

About

A sample program to use DNS protocol to obtain IP address of a given hostname (domain name)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published