没有合适的资源?快使用搜索试试~ 我知道了~
首页stm32f107上实现lwIP TCPIP协议栈
资源详情
资源评论
资源推荐
November 2009 Doc ID 16620 Rev 1 1/18
AN3102
Application note
lwIP TCP/IP stack demonstration
for STM32F107xx connectivity line microcontrollers
Introduction
STM32F107xx connectivity line microcontrollers feature a high-quality 10/100 Ethernet
peripheral that supports both MII and RMII to interface the PHY.
One of the advanced features of the STM32F107xx's Ethernet controller is the capability of
generating, inserting and verifying the checksums of the IP, UDP, TCP and ICMP protocols
by hardware. In this application note, you can find a real application that uses this feature.
The objective of this application note is to present a demonstration package built on top of a
free TCP/IP stack: the lwIP (lightweight IP). This package contains:
● A DHCP client, for IP address setting
● A Hello example based on the Telnet protocol
● A TFTP server, which transfers files from and to the microSD™ card located on the
STM3210C-EVAL board
● A web server
● A Server/Clients example, which uses multiple boards and allows clients to control the
server's LEDs.
www.st.com
Contents AN3102
2/18 Doc ID 16620 Rev 1
Contents
1 Porting lwIP to the STM32F107xx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1 lwIP stack overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2 How to port lwIP to the STM32F107xx . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2.1 Ethernet controller interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2.2 Periodic lwIP tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2.3 lwIP configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2.4 STM32F107xx hardware checksum . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2 Description of the demonstration package . . . . . . . . . . . . . . . . . . . . . . 8
2.1 Package directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2 Demonstration settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2.1 PHY interface configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2.2 MAC address settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2.3 IP address settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2.4 STM3210C-EVAL settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3 How to use the demonstration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.3.1 Demonstration overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.3.2 Hello example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.3.3 Web server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.3.4 TFTP server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.3.5 UDP/TCP server/client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.4 Demonstration footprint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
AN3102 List of tables
Doc ID 16620 Rev 1 3/18
List of tables
Table 1. STM3210C-EVAL jumpers configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Table 2. STM32F107xx lwIP demonstration footprint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Table 3. Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
List of figures AN3102
4/18 Doc ID 16620 Rev 1
List of figures
Figure 1. Demonstration package structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Figure 2. How applications handle a packet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Figure 3. UDP communication to establish the connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Figure 4. Telnet demonstration example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Figure 5. Web server browsing: here the static IP address is set . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Figure 6. tftpd32 tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Figure 7. lwIP structure in the raw API. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
剩余17页未读,继续阅读
fcvjbnjikljhgfcdxfgh
- 粉丝: 2
- 资源: 21
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- 2022年中国足球球迷营销价值报告.pdf
- 房地产培训 -营销总每天在干嘛.pptx
- 黄色简约实用介绍_汇报PPT模板.pptx
- 嵌入式系统原理及应用:第三章 ARM编程简介_3.pdf
- 多媒体应用系统.pptx
- 黄灰配色简约设计精美大气商务汇报PPT模板.pptx
- 用matlab绘制差分方程Z变换-反变换-zplane-residuez-tf2zp-zp2tf-tf2sos-sos2tf-幅相频谱等等.docx
- 网络营销策略-网络营销团队的建立.docx
- 电子商务示范企业申请报告.doc
- 淡雅灰低面风背景完整框架创业商业计划书PPT模板.pptx
- 计算模型与算法技术:10-Iterative Improvement.ppt
- 计算模型与算法技术:9-Greedy Technique.ppt
- 计算模型与算法技术:6-Transform-and-Conquer.ppt
- 云服务安全风险分析研究.pdf
- 软件工程笔记(完整版).doc
- 电子商务网项目实例规划书.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论4