Download presentation
Presentation is loading. Please wait.
Published byRandall Wright Modified over 9 years ago
1
© 2010, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction Purpose: This course provides an overview of the SH7216 Ethernet peripheral with the emphasis on user applications with open source uIP TCP/IP stack Objectives: Obtain basic knowledge on SH7216 Ethernet peripherals Find out what is available from Renesas Learn how to run advanced applications with uIP TCP/IP stack Get other freely available tools Content: 21 pages 3 questions Learning Time: 25 minutes
2
© 2010, Renesas Technology America, Inc., All Rights Reserved 2 SH7216 Features CPU core SH-2A (SuperH RISC Engine) Single core FPU (single precision, double precision) Operating frequency CPU: bus/peripheral: 100/200MHz: 50MHz/50MHz Power supply voltage 3.3V+-0.3V(core,I/O), 5.0V+-0.5V(A/D) On-chip memory 512KB/768KB/1MB Flash memory 64kB/96kB/128KB RAM 32k Data Flash (R/W 30K :Target) with BGO function External memory interface SDRAM, Byte-selection SRAM, burst ROM 8-bit, 16-bit and 32-bit Peripheral functions Multifunction 16-bit PWM timer: 16-bit cycle timer: 2ch Watchdog timer: 1ch I2C bus interface: 1ch DMA controller: 8ch + DTC 12-bit A/D converter: 4ch x 2 Units SCI: 4ch SCIF: 1ch (16-stage transmit and receive FIFO) SH-2A + FPU 100/200MHz External Memory I/F 8/16/32-bit DMAC (8 Ch) Flash (512K/768K/1MB) RAM (64K/96K/128KB) WDT USART (5 ch) I2C, SPI Multi Function Timer2 Unit (16-bit x 6 ch) Multi Function Timer2S Unit (16-bit x 3 ch) Compare Timer (16-bit x 2 ch) 12-bit ADC (4ch x 2 units) I/O Ports USB 2.0 FS Device CAN Ethernet 10/100 MAC DTC Data Flash (32KB) Peripheral functions (con’t) RSPI I/F RCAN I/F Ethernet MAC I/F USB2.0 function (full speed): 1ch
3
© 2010, Renesas Technology America, Inc., All Rights Reserved 3 Ethernet Peripheral Ethernet Controller (EtherC) Compliant with Ethernet and IEEE 802.3 frames Type encapsulation (Ethernet) Length encapsulation (IEEE 803.2) Supports 10 and 100 Mbps operation Supports half and full duplex modes PAUSE MAC layer flow control (IEEE 802.3x) When in full duplex mode Media Independent Interface (MII) PHY layer interface Magic Packet detection and Wake-On-LAN (WOL)
4
© 2010, Renesas Technology America, Inc., All Rights Reserved 4 Ethernet Peripheral Ethernet Direct Memory Access Controller (E-DMAC) Directly connected to EtherC Reduce CPU workload Efficient system bus utilization by block transfers Transmit and receive buffer management Descriptors to define and control the buffers Support single frame and multi-buffer operation
5
© 2010, Renesas Technology America, Inc., All Rights Reserved 5 Ethernet Peripheral
7
© 2010, Renesas Technology America, Inc., All Rights Reserved 7 Questions (1) True or False EtherC is responsible for moving Ethernet data to/from system memory False. This is done by E-DMAC. Main responsibility of EtherC is transmission and reception of Ethernet frames E-DMAC can work with internal and external RAM True. There is no limitation on memory space for E-DMAC operations EtherC and E-DMAC functions together to reduce CPU load True. For example while EtherC is busy receiving data, E-DMAC can move them to system RAM without loading the CPU Renesas Ethernet peripherals are almost the same across the different families True. This allows code re-use and easy migration to other Renesas Ethernet devices
8
© 2010, Renesas Technology America, Inc., All Rights Reserved 8 Renesas Software Library Demonstration Project Ethernet peripheral drivers Complete TCP/IP stack implementation Web server example DHCP client
9
© 2010, Renesas Technology America, Inc., All Rights Reserved 9 Renesas Software Library Application Note Demonstration setup DHCP operation Creation of new Web pages 192.168. 1.101 uIP Demo
10
© 2010, Renesas Technology America, Inc., All Rights Reserved 10 uIP TCP/IP Stack Features of the uIP TCP/IP Stack Perfect solution for simple applications Small footprint Works on 8-bit to 32-bit MCUs Needs only a timer peripheral No RTOS required High-level applications supported Web server and client ARP, IP, ICMP (ping), TCP, DHCP, Telnet, DNS Supported by active community of developers Developed by Adam Dunkels at Swedish Institute of Computer Science Free to use and distribute
12
© 2010, Renesas Technology America, Inc., All Rights Reserved 12 uIP TCP/IP Advanced Demo
13
© 2010, Renesas Technology America, Inc., All Rights Reserved 13 uIP - Advanced Demo You should see a demo video in another browser window. [If you don’t see another window check for pop-up blocking.]
14
© 2010, Renesas Technology America, Inc., All Rights Reserved 14 uIP – Application Functions uip_newdata() Checks if new data has received uip_acked() Checks if the last data sent has been acknowledged uip_closed() Checks if the connection is closed uip_send() Sends TCP or UDP data No support for socket style send More on this later uip_listen() Listen a given port for incoming data
15
© 2010, Renesas Technology America, Inc., All Rights Reserved 15 uIP – Running Multiple Applications Adding a Top Layer Web server uses TCP port 80
16
© 2010, Renesas Technology America, Inc., All Rights Reserved 16 uIP – Running Multiple Applications Adding a Top Layer Advanced demo uses TCP port 5001
17
© 2010, Renesas Technology America, Inc., All Rights Reserved 17 uIP – Sending Data Main loop – Invoke the stack uIP stack – Call the application Top layer application – Multiplex applications Application handler – Fill in the application data Main loop – Transmit Flow of execution uIP stack – Fill in the protocol headers
18
© 2010, Renesas Technology America, Inc., All Rights Reserved 18 uIP – Sending Data Create application information structure Fill in connection information Both for TCP and UDP Determine when to send data out Determine whether TCP ACKs can be used Call uIP stack For TCP use uip_poll_conn() For UDP use uip_udp_periodic_conn() Call uip_send in application handler Write data to the Ethernet peripheral
19
© 2010, Renesas Technology America, Inc., All Rights Reserved 19 Renesas Rulz Advanced Demo GUI demo SH7126 advanced demo http://www.renesasrulz.com
20
© 2010, Renesas Technology America, Inc., All Rights Reserved 20 Freely Available Tools Wireshark De facto network protocol analyzer Extensive analysis and frame filtering Freely available from http://www.wireshark.org/ http://www.wireshark.org/ Fping ICMP (ping) message tests the connectivity to another device Fping builds on DOS ping utility with more options Freely available from http://www.kwakkelflap.com/fping.html http://www.kwakkelflap.com/fping.html
22
© 2010, Renesas Technology America, Inc., All Rights Reserved 22 Summary Basics of SH7216 Ethernet block Ethernet Controller (EtherC) Ethernet Direct Memory Access Controller (E-DMAC) Linked list operation of E-DMAC Code re-usage due to similar peripheral across the families Demo application Web server DHCP feature Advanced demo Multiple TCP and UDP connections Throughput measurements uIP improvements Multiple applications Sending data
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.