当前位置:首页 >> 信息与通信 >>

STM32F107的以太网应用


STM32 Connectivity Line
Ethernet & TCP/IP introduction
2009年STM32 全国研讨会

北京、深圳、上海、台北、 青岛、重庆、南京、哈尔滨、 武汉、福州、西安

Content STM32F107 Ethernet Generic information about TCP-IP Nichelite TCP-IP Stack Application Examples

STM32 全国研讨会 14-25/09/2009

2

The STM32F107 MAC block diagram
? Configurable and flexible MAC 802.3 ? Support two industry standard interfaces for the PHY
– Media Independent Interface (MII) – Reduced Media Independent Interface (RMII)

? Integrated DMA controller ? Hardware support of IEEE 1588 ? Ethernet wakeup event
Ethernet
DMA FIFO FIFO TX RX

IEEE 1588 MAC 802.3
MII / RMII MDC / MDIO

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:00 09:10

09:00 09:01

09:00 Grand Master Clock 09:00

09:00 09:05

09:00 09:30

STM32 全国研讨会 14-25/09/2009

4

Content STM32F107 Ethernet Generic information about TCP-IP Nichelite TCP-IP Stack Application Examples

STM32 全国研讨会 14-25/09/2009

5

Generic information about TCP-IP

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

um ks 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

su ck e

m

IP

ress IP Add

um ks c he C

ET H ER N ET

ress C Add MA

IP Header Ethernet Header IP Header

UDP Header UDP Header

STM32 全国研讨会 14-25/09/2009

TCP-IP : Key Protocols
um

s ck he C

ddre M AC A

IP
E

et thern ss

IP I want to send data to 127.127.127.127
UDP I want to send a datagram on the port #

Transport Layer

TCP

UDP

C

u ks ec h

UDP
m

IP

dress IP Ad

Internet Layer

C

u ks ec h

TCP
m

IP

dress IP ad

I want to TCP send data in a reliable way on the port #

IP

Datalink Layer
Ethernet STM32F107 PHY

Click on the “letter” to get a detailed description
STM32 全国研讨会 14-25/09/2009

9

TCP-IP : Key Protocols
Transport Layer
u ks ec h

C

F F.FF.F F.FF.F FF.F

ARP
m

net Ether

ARP Who knows 127.127.127.127’s MAC address?

TCP

UDP

ICMP s dd r e s
C su ck he m

IP

IP A

ICMP I send or receive queries or error messages

Internet Layer PING ICMP 127.127.127.127

IP

ARP Click on the “letter” to get a detailed ET H ER m Layer Datalink su N ET description ck e
Ch

ddre MAC A ??

s s ??

Ethernet

STM32F107 PHY

STM32 全国研讨会 14-25/09/2009

10

TCP-IP : Key Application layer protocols
Application Layer

DHCP/ /68 rts 67 Po BOOTP
C su ck he m u ks ec h

UDP

I want to get an DHCP IP address ?

BOOTP

DNS
Transport Layer

BOOTP DHCP UDP

C

DNS3 P o rt 5
m

TCP) UDP (

What is DNS the IP address of www.st.com ?

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

Application layer protocols
World Wide Web
su ck he m

Email

HTTP 0 P o rt 8
C u ks ec h m

TCP

I want HTTP this resource.

C

SMTP 5 P o rt 2
m

TCP

I want to SMTP send an email

Login : _

Terminal connection
m

POP3 10 Port 1
C u ks ec h

TCP

I want to POP3 get my emails.

C

Telnet rt 2 3
u ks ec h

TCP

Po

I want Telnet a terminal connection.
C u ks ec h m

Files Transfer

Network Management
C u ks ec h

TFTP 9 P o rt 6
C u ks ec h

UDP

I want to TFTP transfer files. I want to FTP transfer files

Por

SNMP

I want to SNMP manage /162 my network. ts 161
m

UDP

Port

FTP 1 2 s 20/
m

TCP

STM32 全国研讨会 14-25/09/2009

12

Application layer protocols
World Wide Web File Transfer
email Other Domain Names

Application Layer
Configuration

SMTP

POP3

Telnet

DNS (c)

WWW

File Transfer

Network mgt

BOOTP DHCP (c)

HTTP

FTP

TFTP

SNMP

Email

TCP

UDP

Transport Layer Internet Layer Datalink Layer

Login : _

Terminal connection Network Management

ICMP ARP Ethernet

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

NicheLite from Interniche Free Package from ST Source code available
Webserver Demo Domain Names Configuration

HTTP demo
TCP / UDP demo

DNS (c)

DHCP (c) BOOTP
File Transfer

TCP client / server demo

UDP client / server demo TCP ICMP

TFTP UDP IP

Included Optional Demos
Other solutions

Others
Nichetool

ARP Ethernet

STM32F107 PHY
15

STM32 全国研讨会 14-25/09/2009

NicheLite from Interniche Free Package from ST Source code available
Domain Names

See Application Note DNS (c) DHCP (c) HTTP demo AN3000 on our website BOOTP UDP TCP description for a detailedclient / serverclient / demo server demo TFTP of the Package
Webserver Demo TCP / UDP demo File Transfer

Configuration

TCP ICMP www.st.com/stm32 Included

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

C

u ks ec h

m

TCP

? Lost data / data reordering is not handled by the protocol

STM32 全国研讨会 14-25/09/2009

ro ow to n co l
18

Example 1 : Ethernet Block Diagram
le xamp E w a re 15 pins MII Hard MII+MDC s = ration u 17 pins ll co f i g rpinsn d as we MDC/MDIO he Ot 2 e be u s can
XT1 STM32F107
25MHz 25MHz

Ethernet MAC 10/100
XTAL 25MHz

OSC

PLL

HCLK

PHY

? One 25Mhz external crystal (internal oscillator) ? MII interface
– 15 pins for the communication between the MAC & PHY – 2 pins for the MDC / MDIO (to access PHY registers)
STM32 全国研讨会 14-25/09/2009
19

Example 1 : user defined protocol over TCP-IP

Domain Names

Configuration

TCP client / server Application

DNS (c)

DHCP (c)

TCP

UDP

IP ARP ARP
Ethernet Ethernet

ICMP

STM32F107 PHY
STM32 全国研讨会 14-25/09/2009

Included Based on demos

20

Example 2 : Firmware upgrade
Hardware Requirements ? Use RMII to optimize the GPIO usage ? Reduce the BOM cost Software Requirements ? Need a commercial solution ? Need a cost effective solution ? Need the source code ? Using a simple protocol ? Reliable protocol

I want to TFTP transfer files.

TFTP9 6
C u ks ec 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 s ample ? Or one 50Mhz external oscillator x a re E
H a rd w
Ethernet MAC 10/100

ns uratio ll fi c pins g as MII r 7 on RMII we Othe d e+MDC be us = 9 pins ca MDC/MDIO n
RMII_REF_CLK

RMII + XTAL 25MHz

HCLK OSC

50MHz

PHY XT1/XT2 50MHz

PLLs
PHY_CLK

RMII + OSC 50MHz

PLL

50MHz
HCLK

RMII_REF_CLK

PHY XT1
50MHz 22

PHY_CLK

STM32 全国研讨会 14-25/09/2009

Example 2 : Firmware upgrade

File Transfer

Domain Names

Configuration

TFTP Upgrade Application

TFTP

DNS (c)

DHCP (c)

TCP

UDP

IP ARP

ICMP

STM32F107 PHY
STM32 全国研讨会 14-25/09/2009

Included Demo under development

Ethernet 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


相关文章:
STM32毕业论文
本设计通过 STM32F107 控制无线收发模块从无线网络节点接收数据,进行相 关处理后通过以太网把数据发送至应用服务器。系统的用户统用户通过 Internet 网 络访问应用...
RMII模式以太网PHY芯片DP83848C的应用
RMII模式以太网PHY芯片DP83848C的应用_信息与通信_工程科技_专业资料。RMll模式描述 RMII 模式以太网 PHY 芯片 DP83848C 的应用 宋鑫 郭勇 谢兴红 引言 DP83848...
基于STM32F107的智能窗帘控制系统设计
【关键词】STM32F107;光线传感器;以太网;智能窗帘 1.引言 随着物联网的发展,...STM32 系列基于专为要求高性能、低成 本、低功耗的嵌入式应用专门设计的 ARM ...
STM32启动文件选用说明
不需要开发人员再行干预启动过程,只需要从 main 函数开始进行应用程序的设计即可...STM32F100xx 系列,也不属于互联型的 STM32F105xx 和 STM32F107xx,所有我...
STM32F407_DP83848_Lwip移植方法
11、 下面是 stm32f4x7_eth_bsp.c ; 配置以太网 (GPIOs, clocks, MAC, ...大家可以参考周立功的<<LWIP 接口与编程指南>>,对一般应用 足够了,在百度文库...
LwIP协议栈开发嵌入式网络的三种方法分析
LwIP协议栈开发嵌入式网络的三种方法分析_计算机软件及应用_IT/计算机_专业资料。...STM32F107 以太网模块 MII_MDIO MII_RXD1 MII_RXD0 MII_RX_DV/ RMII_...
家庭智能系统开发终稿_计算机软件及应用_IT/计算机_专业资料
(论文)的工作基础、研究条件、应用环境、工作目的等): 工作基础:本科阶段开设了...从而实现内部局域控制 网的建立;对外利用 STM32f107 的以太网接口,通过 Web...
stm32芯片简介
(PTP)的以太网接口, 用硬件实现这个协 议可降低 CPU 开销,提高实时应用和联网...产品的功能: STM32 互连型系列产品分为两个型号: STM32F105 和 STM32F107...
STM32常用项初始化配置说明
基础应用 1:时钟的初始化函数过程—— 用法:void ...用的是 STM32F107VC,开发环境 RVMDK4.23 我已经...2014年移动互联网O2O分析报告 2014年在线教育行业分析...
STM32开发平台实验指导书
家族是意法半导体公司的基于 Cortex-M3 内核性价比非常高的微处理 器,应用领域...主要包括 STM32F107 或 STM32F207 芯片的 最小系统,以太网单元电路,3.3V ...
更多相关标签: