W5200 driver for MSP430

Publisher:mb5362443Latest update time:2015-09-30 Source: eefocusKeywords:MSP430 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

I have made many fixes to the previous W5200 driver, including fixing some bugs. It is mainly for MSP430F5438a, but should also work for MSP430 "5" or "6". I have divided the code into blocks according to their function. For example, WIZnet-related files are named starting with "W5200". Debug-related files start with "console".

Current features:

• Full support for TCP/UDP/ICMP and DHCP client

• Contains UDP/TCP sample code

• Ethernet performance test code

• Serial port debugging station, capable of running tests and displaying the status of all W5200 registers

• BSD certified code

The biggest change in the code is to support the relevant tests for MSP430. I did a packet loss test and used the WIZnet client to send as much data as possible at the fastest speed (sending 2048 bytes via TCP), and then I used the command line tool "trafshow" to test the transmission and data throughput. By the way, there are no other hosts in this network system.

The test results are very interesting. When the MSP430 main CPU clock frequency is 16MHz and the W5200 SCLK is also 16MHz, I can send 73,000 bytes of data per second. When I increase the MSP430 and W5200 clock frequencies to 25MHz, the W5200 SPI communication begins to become abnormal.

I'm not sure if this was because I was using a breadboard or something else. When I finally got the MSP430 clock rate to 25MHz and the W5200 to 12.5MHz, I was able to get 105,000 bytes per second. This was interesting - it told me that the MSP430 CPU was limiting the data rate in the first place, not the W5200 chip.

To use this code, you need to configure the hardware according to the config.h file. As shown in the figure above, I used the MSP-EXP430F5438, connected the serial port pins, set the baud rate to 115200Baud, and the data format to 8N1. Use Code Composer to load the code into the board. When you click Run, some useless data will be displayed on the screen at first. Click "?" and an option menu will appear, which will give all the option functions that these codes can achieve.

Example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
*** Info Commands ***
m - MCU info
v - software version
w - W5200 device info
W - W5

Keywords:MSP430 Reference address:W5200 driver for MSP430

Previous article:Single chip Ethernet control chip W7100A data sheet (IV)
Next article:Single chip Ethernet embedded control chip--MCU-W7100A data sheet

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号