STM32F107 Ethernet Introduction
STM32F107 Ethernet Introduction
Content STM32F107 Ethernet Generic information about TCP-IP Nichelite TCP-IP Stack Application Examples
STM32 14-25/09/2009
Integrated DMA controller Hardware support of IEEE 1588 Ethernet wakeup event
Ethernet
DMA FIFO FIFO TX RX
STM32F107
STM32 14-25/09/2009
3
AHB Bus
PHY
Wake up event
Precision Time Protocol (IEEE1588) : What is it It is a protocol designed to synchronize real-time clocks of the devices of a network Synchronization is done with the most accurate clock found in a packet-based network: called the Grand Master Clock. Accuracy is Sub-second
Detailed PTP description
09:10 09:00
09:01 09:00
09:05 09:00
09:30 09:00
STM32 14-25/09/2009
Content STM32F107 Ethernet Generic information about TCP-IP Nichelite TCP-IP Stack Application Examples
STM32 14-25/09/2009
SMTP
BOOTP
FTP
?
HTTP
TFTP
?
POP3
DHCP
SNMP
IP
?
?
?
PPP
DNS
ICMP
?
ARP
TCP
Telnet
UDP ?
6
STM32 14-25/09/2009
TCP-IP : A layered protocol stack Application The main interface for the user. Higher level protocols Layer Transport End-to-end connections (UDP and TCP) Ensure reliability (TCP) Layer Internet Layer Data link Layer
Intra & Inter-Network communication no guaranty of delivery Intra-Network communication Transport data on the physical support
STM32 14-25/09/2009
7
TCP-IP : Encapsulation
TFTP UDP
User
Data
m su k ec Ch
User Data TFTP Header UDP Header TFTP Header TFTP Header TFTP Header User Data User Data User Data User Data Ethernet Trailer
8
b Port N
Ch
u ks c e
IP
ress IP Add
m su k ec h C
ET H ER N ET
dress d A C MA
STM32 14-25/09/2009
ks ec h C
ddre M AC A
IP
E
et thern ss
Transport Layer
TCP
UDP
su ck e h
UDP
m
IP
dress IP Ad
Internet Layer
su ck e h
TCP
m
IP
dress IP ad
IP
Datalink Layer
Ethernet STM32F107 PHY
ARP
m
net Ether
TCP
UDP
ICMP s dd r e s
C su ck he m
IP
IP A
IP
ARP Click on the letter to get a detailed T H ER E m Datalink Layer NET su description k ec
Ch
Addre C A M ??
s s ??
Ethernet
STM32F107 PHY
STM32 14-25/09/2009
10
UDP
BOOTP
DNS
Transport Layer
DNS 3 P o rt 5
m
TCP) UDP (
TCP
Internet Layer
ICMP
Click on the letter to get a detailed description
IP
ARP
Ethernet
Datalink Layer
STM32F107 PHY
11
STM32 14-25/09/2009
HTTP 0 P o rt 8
C su ck e h m
TCP
SMTP 5 P o rt 2
m
TCP
Login : _
Terminal connection
m
POP3 10 Port 1
C su ck e h
TCP
Telnet rt 2 3
su ck e h
TCP
Po
Files Transfer
Network Management
C su ck e h
TFTP 9 P o rt 6
C su ck e h
UDP
Por
SNMP
UDP
Port
FTP 21 s 20/
m
TCP
STM32 14-25/09/2009
12
Application Layer
Configuration
SMTP
POP3
Telnet
DNS (c)
WWW
File Transfer
Network mgt
HTTP
FTP
TFTP
SNMP
TCP
UDP
Login : _
IP
STM32F107 PHY
STM32 14-25/09/2009
13
Content STM32F107 Ethernet Generic information about TCP-IP Nichelite TCP-IP Stack Application Examples
STM32 14-25/09/2009
14
HTTP demo
TCP / UDP demo
DNS (c)
TFTP UDP IP
Others
Nichetool
ARP Ethernet
STM32F107 PHY
15
STM32 14-25/09/2009
See Application Note DNS (c) DHCP (c) HTTP demo AN3000 on our website BOOTP UDP client / TCP client / for a detailed description server demo server demo TFTP of the Package
Webserver Demo TCP / UDP demo File Transfer
Configuration
UDP IP
Optional Demos
Other solutions
Others
Nichetool
ARP
Ethernet
STM32F107 PHY
16
STM32 14-25/09/2009
Content STM32F107 Ethernet Generic information about TCP-IP Nichelite TCP-IP Stack Application Examples
STM32 14-25/09/2009
17
Example 1 : User defined protocol over TCP-IP Hardware Requirements Use a MII PHY already qualified by customer Minimize the BOM cost Software Requirements The customer has its own protocol Data is similar a stream of bytes :
Lost packets need to be resent Packets need to be ordered
Us er de fin M ed P y
su ck e h
TCP
STM32 14-25/09/2009
ro ow to n co l
18
OSC
PLL
HCLK
PHY
Domain Names
Configuration
DNS (c)
DHCP (c)
TCP
UDP
IP ARP ARP
Ethernet
ICMP
STM32F107 PHY
STM32 14-25/09/2009
20
TFTP 69
C su ck e h m
UDP
P o rt
Included
STM32 14-25/09/2009
21
Example 2 :Ethernet Block Diagram RMII interface ( RMII + MDC/MDIO = 9 pins) One 25Mhz external crystal les p m a Or one 50Mhz external oscillator x a re E
H a rd w
Ethernet MAC 10/100
HCLK OSC
50MHz
PLLs
PHY_CLK
PLL
50MHz
HCLK
RMII_REF_CLK
PHY XT1
50MHz 22
PHY_CLK
STM32 14-25/09/2009
File Transfer
Domain Names
Configuration
TFTP
DNS (c)
DHCP (c)
TCP
UDP
IP ARP
ICMP
STM32F107 PHY
STM32 14-25/09/2009
Ethernet
23
Summary
The STM32F107 is a product with advanced features IEEE1588 support MAC IP designed for performances The STM32F107 is a flexible product : RMII and MII connection available on all the packages The customer can use his prefered PHY Minimum external HW required ST offers a effective Hardware & Software solution NicheLite stack available for download with the Key Protocols and demo to start quickly Source code of the stack provided www.st.com/stm32
STM32 14-25/09/2009
24
Thank You
STM32 14-25/09/2009
25