Wiznet makers

mark

Published July 12, 2026 ©

121 UCC

8 WCC

43 VAR

0 Contests

0 Followers

0 Following

Original Link

How to Build DSP Ethernet Examples with WIZnet W5500 on DSP28335?

This education and commercial evaluation article explains how to use WIZnet W5500 with TI DSP28335 / TMS320F28335 to build wired Ethernet examples for network-s

COMPONENTS
PROJECT DESCRIPTION

How to Build DSP Ethernet Examples with WIZnet W5500 on DSP28335?

Summary

This education and commercial evaluation article explains how to use WIZnet W5500 with TI DSP28335 / TMS320F28335 to build wired Ethernet examples for network-stack learning, hardware wiring, register inspection, firmware bring-up, and performance validation. The GitCode project provides a “DSP28335 + W5500” official example resource containing DSP2000-series and W5500 example code plus related documentation, but the visible repository page exposes README-level information rather than inspectable source files. W5500 provides the Ethernet MAC/PHY, hardwired TCP/IP stack, socket engine, and internal Tx/Rx buffering, while DSP28335 handles real-time control, SPI access, application logic, diagnostics, and product-specific protocol behavior.

What the Project Does

The source project is a DSP28335 + W5500 example-code and documentation resource. Its purpose is to help developers combine the DSP28335 control platform with W5500 Ethernet networking, import the example into a development environment such as Code Composer Studio, configure it, debug it, and use it as a starting point for network communication. The related CSDN mirror describes the resource as including DSP28335 official example code, W5500 official example code, and documents explaining code structure, configuration, and debugging.

The practical data flow is:

DSP28335 application → SPI driver and W5500 register/socket layer → W5500 → RJ45 Ethernet → switch, PC tool, gateway, test server, or commercial controller.

For education, this project is useful because students can connect real-time DSP firmware to a hardware TCP/IP Ethernet controller and observe the difference between MCU-side control code and Ethernet-side socket behavior. For commercial evaluation, it is useful as a starting point for wired service ports, motor-control monitoring, data acquisition gateways, industrial control panels, and deterministic local diagnostics.

Where WIZnet Fits

The exact WIZnet product is W5500. It sits between the DSP28335 and the Ethernet connector. DSP28335 communicates with W5500 through SPI, chip select, reset, and optionally interrupt. W5500 handles Ethernet MAC/PHY operation, hardwired TCP/IP processing, socket state transitions, and packet buffering.

W5500 is a hardwired TCP/IP Internet controller with SPI access up to 80 MHz. It integrates a 10/100 Ethernet MAC and PHY, supports TCP, UDP, ICMP, IPv4, ARP, IGMP, and PPPoE, provides 8 independent sockets, and includes 32 KB internal memory for Tx/Rx buffers.

DSP28335 is a TI C2000 32-bit MCU with 150 MIPS performance, FPU, 512 KB flash, 68 KB RAM, one SPI module, CAN, I2C, UART, PWM, ADC, DMA, and real-time control features. That makes the platform suitable for control-heavy applications where Ethernet should be a communication function rather than the center of the firmware.

This split is important. DSP28335 should keep ownership of sampling, control loops, signal processing, timing, fault handling, and application state. W5500 should own the bounded Ethernet transport path: link state, socket state, Tx free space, Rx received size, TCP/UDP handling, and packet buffering.

Implementation Notes

The GitCode project confirms a DSP28335 + W5500 example resource, but the visible repository page did not expose inspectable C source files during verification. Therefore, no project-specific code from the GitCode archive is quoted here. The snippets below are verified reference snippets from WIZnet’s official ioLibrary_Driver, which WIZnet lists as an official W5500 software resource.

File: Ethernet/wizchip_conf.h
What it configures: WIZnet chip selection and W5500 SPI interface mode.
Why it matters: this is the firmware boundary where the DSP28335 project selects W5500 and confirms that the host interface is SPI.

 
#define W5100 5100 #define W5100S 5100+5 #define W5200 5200 #define W5300 5300 #define W5500 5500 #define W6100 6100

#elif (_WIZCHIP_ == W5500) #define _WIZCHIP_ID_ "W5500\0"

#ifndef _WIZCHIP_IO_MODE_ #define _WIZCHIP_IO_MODE_ _WIZCHIP_IO_MODE_SPI_ #endif
 

The same configuration header defines the WIZnet chip family, includes W5500 support, selects SPI mode for W5500 when no other mode is defined, and sets _WIZCHIP_SOCK_NUM_ to 8 for W5200 and later devices, which includes W5500.

File: Ethernet/W5500/w5500.h
What it configures: W5500 register access for local IP, PHY status, chip version, socket mode, socket command, socket status, and buffer state.
Why it matters: education labs and commercial bring-up both need register-level visibility. These functions help separate SPI faults, link faults, IP configuration faults, socket-state faults, and peer-side failures.

 
#define setSIPR(sipr) \
    WIZCHIP_WRITE_BUF(SIPR, sipr, 4)

#define getSIPR(sipr) \
    WIZCHIP_READ_BUF(SIPR, sipr, 4)

#define setSn_MR(sn, mr) \
    WIZCHIP_WRITE(Sn_MR(sn),mr)

#define getSn_MR(sn) \
    WIZCHIP_READ(Sn_MR(sn))
 

The W5500 header defines VERSIONR as the chip version register, PHYCFGR as the PHY configuration/status register, Sn_MR as the socket mode register, Sn_CR as the socket command register, and Sn_TX_FSR as the socket transmit free-size register. It also documents socket commands such as OPEN, LISTEN, CONNECT, CLOSE, SEND, and RECV.

Practical Tips / Pitfalls

  • Bring up SPI before Ethernet. Confirm chip select timing, SPI clock polarity/phase, and a stable W5500 version-register read before testing TCP or UDP.
  • Route W5500 reset to a DSP28335 GPIO. A commercial controller should recover Ethernet without rebooting the full control system.
  • Use interrupt when receive, disconnect, timeout, or send-complete events should not depend on continuous polling.
  • Treat W5500’s 8 sockets as fixed resources. Reserve sockets for telemetry, configuration, diagnostics, service access, discovery, and future expansion.
  • Log VERSIONR, PHYCFGR, IP address, socket status, Tx free size, Rx received size, reconnect count, and last socket error.
  • Keep the Ethernet task bounded. DSP28335 control loops and sampling work should not be delayed by blocking socket handling.
  • For commercial validation, test cable removal, switch reboot, duplicate IP, peer restart, long idle time, socket close, and watchdog recovery.

FAQ

Q: Why use WIZnet W5500 with DSP28335?
A: W5500 gives DSP28335 wired Ethernet without forcing the DSP firmware to carry a full software TCP/IP stack. It provides hardwired TCP/IP, 8 sockets, and 32 KB internal Tx/Rx buffering, while DSP28335 remains focused on real-time control, signal processing, data acquisition, diagnostics, and application behavior.

Q: How does W5500 connect to the DSP28335 platform?
A: W5500 connects through SPI using SCLK, MOSI, MISO, chip select, reset, power, and ground. Interrupt is optional for a first lab but recommended for commercial firmware that needs bounded handling of receive, disconnect, timeout, and send-complete events. DSP28335 includes one SPI module, so the firmware port should focus on correct SPI transaction timing and W5500 chip-select control.

Q: What role does W5500 play in this project?
A: W5500 is the wired Ethernet transport engine. DSP28335 owns the control application and protocol payloads; W5500 owns Ethernet MAC/PHY behavior, TCP/UDP processing, socket state transitions, and Tx/Rx packet buffers.

Q: Can beginners follow this project?
A: Yes, if the lesson is staged. The practical order is DSP28335 project import, SPI wiring check, W5500 reset check, version-register read, PHY link check, static IP or DHCP setup, UDP test, TCP test, socket-state logging, and then application-specific protocol work.

Q: How does W5500 compare with Wi-Fi for education and commercial evaluation?
A: Wi-Fi is better when the device must be cable-free. W5500 is better when the goal is to teach or validate a visible network boundary: SPI transactions, reset, PHY link, socket state, Tx/Rx buffer limits, and deterministic wired service behavior. For commercial DSP28335 equipment, wired W5500 Ethernet is easier to validate for factory setup, service ports, local diagnostics, and fixed industrial installations.

Source

Original source: GitCode repository “DSP28335W5500官方实例资源下载: DSP28335与W5500官方实例代码及文档下载.” The page states that the repository provides a “DSP28335 + W5500” resource containing official example code and related documentation for DSP2000-series devices and W5500. It also shows an MIT license link, but the visible page did not expose inspectable source files during verification.

Related CSDN mirror: “DSP28335 + W5500 官方实例资源下载.” The article describes DSP28335 official example code, W5500 official example code, related documents, usage steps, Code Composer Studio import, configuration, debugging, and CC 4.0 BY-SA licensing for the article.

TI product reference: TMS320F28335, C2000 32-bit MCU with 150 MIPS, FPU, 512 KB flash, 68 KB RAM, one SPI module, and real-time control peripherals.

WIZnet product reference: W5500 documentation and feature list, including hardwired TCP/IP, SPI up to 80 MHz, 8 sockets, 32 KB buffer memory, and supported TCP/UDP networking functions.

WIZnet driver reference: official ioLibrary_Driver, including W5500 chip selection, SPI interface configuration, register access, PHY status, socket control, and buffer-state access.

Tags

#W5500 #WIZnet #DSP28335 #TMS320F28335 #C2000 #Education #Commercial #Ethernet #SPI #Registers #NetworkStack #Firmware #Performance #Socket

 

DSP28335에서 WIZnet W5500으로 DSP Ethernet 예제를 구축하는 방법은?

요약

이 교육 및 상용 평가용 글은 TI DSP28335 / TMS320F28335에서 WIZnet W5500을 사용해 network-stack learning, hardware wiring, register inspection, firmware bring-up, performance validation을 위한 유선 Ethernet 예제를 구축하는 방법을 설명합니다. GitCode 프로젝트는 DSP2000 series 및 W5500 example code와 관련 documentation을 포함한 “DSP28335 + W5500” 공식 예제 resource를 제공하지만, visible repository page는 inspect 가능한 source file이 아니라 README 수준의 정보를 노출합니다. W5500은 Ethernet MAC/PHY, hardwired TCP/IP stack, socket engine, internal Tx/Rx buffering을 제공하고, DSP28335는 real-time control, SPI access, application logic, diagnostics, product-specific protocol behavior를 처리합니다.

프로젝트가 하는 일

소스 프로젝트는 DSP28335 + W5500 example-code 및 documentation resource입니다. 목적은 개발자가 DSP28335 control platform과 W5500 Ethernet networking을 결합하고, Code Composer Studio 같은 개발 환경에 예제를 import한 뒤, configure, debug, network communication 시작점으로 활용할 수 있도록 돕는 것입니다. 관련 CSDN mirror는 이 resource가 DSP28335 official example code, W5500 official example code, code structure, configuration, debugging을 설명하는 document를 포함한다고 설명합니다.

실제 데이터 흐름은 다음과 같습니다.

DSP28335 application → SPI driver and W5500 register/socket layer → W5500 → RJ45 Ethernet → switch, PC tool, gateway, test server 또는 commercial controller

교육 측면에서 이 프로젝트는 학생들이 real-time DSP firmware를 hardware TCP/IP Ethernet controller와 연결하고, MCU-side control code와 Ethernet-side socket behavior의 차이를 관찰할 수 있게 해줍니다. 상용 평가 측면에서는 wired service port, motor-control monitoring, data acquisition gateway, industrial control panel, deterministic local diagnostics의 시작점으로 유용합니다.

WIZnet이 들어가는 위치

이 프로젝트에서 사용되는 정확한 WIZnet 제품은 W5500입니다. W5500은 DSP28335와 Ethernet connector 사이에 위치합니다. DSP28335는 SPI, chip select, reset, 선택적으로 interrupt를 통해 W5500과 통신합니다. W5500은 Ethernet MAC/PHY operation, hardwired TCP/IP processing, socket state transition, packet buffering을 처리합니다.

W5500은 최대 80 MHz SPI access를 지원하는 hardwired TCP/IP Internet controller입니다. 10/100 Ethernet MAC and PHY를 통합하고, TCP, UDP, ICMP, IPv4, ARP, IGMP, PPPoE를 지원하며, 8개 independent socket과 Tx/Rx buffer용 32 KB internal memory를 포함합니다.

DSP28335는 150 MIPS performance, FPU, 512 KB flash, 68 KB RAM, one SPI module, CAN, I2C, UART, PWM, ADC, DMA, real-time control feature를 갖춘 TI C2000 32-bit MCU입니다. 이 플랫폼은 Ethernet이 firmware 중심이 아니라 communication function으로 동작해야 하는 control-heavy application에 적합합니다.

이 분업은 중요합니다. DSP28335는 sampling, control loop, signal processing, timing, fault handling, application state를 계속 담당해야 합니다. W5500은 link state, socket state, Tx free space, Rx received size, TCP/UDP handling, packet buffering 같은 제한된 Ethernet transport path를 담당해야 합니다.

구현 참고 사항

GitCode 프로젝트는 DSP28335 + W5500 example resource임을 확인할 수 있지만, visible repository page는 검증 중 inspect 가능한 C source file을 노출하지 않았습니다. 따라서 GitCode archive의 프로젝트별 코드는 인용하지 않습니다. 아래 snippet은 WIZnet이 공식 W5500 software resource로 제공하는 ioLibrary_Driver에서 가져온 검증된 reference snippet입니다.

파일: Ethernet/wizchip_conf.h
설정 내용: WIZnet chip selection 및 W5500 SPI interface mode
중요한 이유: DSP28335 project가 W5500을 선택하고 host interface가 SPI임을 확인하는 firmware boundary입니다.

 
#define W5100 5100 #define W5100S 5100+5 #define W5200 5200 #define W5300 5300 #define W5500 5500 #define W6100 6100

#elif (_WIZCHIP_ == W5500) #define _WIZCHIP_ID_ "W5500\0"

#ifndef _WIZCHIP_IO_MODE_ #define _WIZCHIP_IO_MODE_ _WIZCHIP_IO_MODE_SPI_ #endif
 

같은 configuration header는 WIZnet chip family를 정의하고, W5500 support를 포함하며, 다른 mode가 정의되지 않은 경우 W5500에 대해 SPI mode를 선택합니다. 또한 W5500을 포함하는 W5200 이후 device에 대해 _WIZCHIP_SOCK_NUM_을 8로 설정합니다.

파일: Ethernet/W5500/w5500.h
설정 내용: local IP, PHY status, chip version, socket mode, socket command, socket status, buffer state를 위한 W5500 register access
중요한 이유: Education lab과 commercial bring-up 모두 register-level visibility가 필요합니다. 이 function들은 SPI fault, link fault, IP configuration fault, socket-state fault, peer-side failure를 구분하는 데 도움이 됩니다.

 
#define setSIPR(sipr) \
    WIZCHIP_WRITE_BUF(SIPR, sipr, 4)

#define getSIPR(sipr) \
    WIZCHIP_READ_BUF(SIPR, sipr, 4)

#define setSn_MR(sn, mr) \
    WIZCHIP_WRITE(Sn_MR(sn),mr)

#define getSn_MR(sn) \
    WIZCHIP_READ(Sn_MR(sn))
 

W5500 header는 VERSIONR을 chip version register, PHYCFGR을 PHY configuration/status register, Sn_MR을 socket mode register, Sn_CR을 socket command register, Sn_TX_FSR을 socket transmit free-size register로 정의합니다. 또한 OPEN, LISTEN, CONNECT, CLOSE, SEND, RECV 같은 socket command를 문서화합니다.

실무 팁 / 주의점

  • Ethernet보다 SPI를 먼저 bring-up해야 합니다. TCP 또는 UDP를 테스트하기 전에 chip select timing, SPI clock polarity/phase, 안정적인 W5500 version-register read를 확인해야 합니다.
  • W5500 reset은 DSP28335 GPIO에 연결해야 합니다. 상용 controller는 전체 control system을 reboot하지 않고 Ethernet을 복구할 수 있어야 합니다.
  • Receive, disconnect, timeout, send-complete event가 continuous polling에 의존하지 않아야 한다면 interrupt를 사용하는 것이 좋습니다.
  • W5500의 8개 socket은 고정된 자원으로 다뤄야 합니다. Telemetry, configuration, diagnostics, service access, discovery, future expansion용 socket을 예약해야 합니다.
  • VERSIONR, PHYCFGR, IP address, socket status, Tx free size, Rx received size, reconnect count, last socket error를 기록해야 합니다.
  • Ethernet task는 bounded하게 유지해야 합니다. DSP28335 control loop와 sampling 작업이 blocking socket handling으로 지연되면 안 됩니다.
  • 상용 검증에서는 cable removal, switch reboot, duplicate IP, peer restart, long idle time, socket close, watchdog recovery를 테스트해야 합니다.

FAQ

Q: DSP28335에 왜 WIZnet W5500을 사용하나요?
A: W5500은 DSP firmware가 full software TCP/IP stack을 부담하지 않고도 DSP28335에 유선 Ethernet을 제공합니다. Hardwired TCP/IP, 8개 socket, 32 KB internal Tx/Rx buffering을 제공하므로, DSP28335는 real-time control, signal processing, data acquisition, diagnostics, application behavior에 집중할 수 있습니다.

Q: W5500은 DSP28335 platform에 어떻게 연결되나요?
A: W5500은 SCLK, MOSI, MISO, chip select, reset, power, ground를 사용하는 SPI로 연결됩니다. 초기 lab에서는 interrupt가 선택 사항일 수 있지만, receive, disconnect, timeout, send-complete event를 bounded하게 처리해야 하는 commercial firmware에서는 권장됩니다. DSP28335는 one SPI module을 포함하므로, firmware port에서는 올바른 SPI transaction timing과 W5500 chip-select control에 집중해야 합니다.

Q: 이 프로젝트에서 W5500은 어떤 역할을 하나요?
A: W5500은 유선 Ethernet transport engine입니다. DSP28335는 control application과 protocol payload를 담당하고, W5500은 Ethernet MAC/PHY behavior, TCP/UDP processing, socket state transition, Tx/Rx packet buffer를 담당합니다.

Q: 초보자도 이 프로젝트를 따라갈 수 있나요?
A: 가능합니다. 다만 수업을 단계적으로 구성해야 합니다. 실용적인 순서는 DSP28335 project import, SPI wiring check, W5500 reset check, version-register read, PHY link check, static IP 또는 DHCP setup, UDP test, TCP test, socket-state logging, 그다음 application-specific protocol work입니다.

Q: Education 및 commercial evaluation에서 W5500은 Wi-Fi와 비교하면 어떤 차이가 있나요?
A: Wi-Fi는 device가 cable-free여야 할 때 더 적합합니다. W5500은 visible network boundary를 가르치거나 검증하는 데 더 적합합니다. 여기에는 SPI transaction, reset, PHY link, socket state, Tx/Rx buffer limit, deterministic wired service behavior가 포함됩니다. Commercial DSP28335 equipment에서는 wired W5500 Ethernet이 factory setup, service port, local diagnostics, fixed industrial installation 검증에 더 쉽습니다.

출처

Original source: GitCode repository “DSP28335W5500官方实例资源下载: DSP28335与W5500官方实例代码及文档下载.” 해당 page는 DSP2000-series device와 W5500을 위한 official example code 및 관련 documentation을 포함한 “DSP28335 + W5500” resource를 제공한다고 설명합니다. MIT license link도 표시하지만, 검증 중 visible page는 inspect 가능한 source file을 노출하지 않았습니다.
https://gitcode.com/open-source-toolkit/8fcd8

Related CSDN mirror: “DSP28335 + W5500 官方实例资源下载.” 해당 article은 DSP28335 official example code, W5500 official example code, related document, usage step, Code Composer Studio import, configuration, debugging, article의 CC 4.0 BY-SA licensing을 설명합니다.
https://blog.csdn.net/gitblog_09770/article/details/143013646

TI product reference: TMS320F28335, 150 MIPS, FPU, 512 KB flash, 68 KB RAM, one SPI module, real-time control peripheral을 갖춘 C2000 32-bit MCU.
https://www.ti.com/product/TMS320F28335

WIZnet product reference: W5500 documentation and feature list, including hardwired TCP/IP, SPI up to 80 MHz, 8 sockets, 32 KB buffer memory, and supported TCP/UDP networking functions.
https://docs.wiznet.io/Product/Chip/Ethernet/W5500

WIZnet driver reference: official ioLibrary_Driver, including W5500 chip selection, SPI interface configuration, register access, PHY status, socket control, and buffer-state access.
https://github.com/Wiznet/ioLibrary_Driver

태그

#W5500 #WIZnet #DSP28335 #TMS320F28335 #C2000 #Education #Commercial #Ethernet #SPI #Registers #NetworkStack #Firmware #Performance #Socket

Documents
Comments Write