Freescale Semiconductor, Inc. Internet Connectivity with HCS12 16-bit Microcontroller using the ACP Reference . . . c Design n I , r o t Designer Reference c u Manual d n o c M68HC12 i m e Microcontrollers S e l a DRM049 c Rev. 0, 09/2003 s e e r F MOTOROLA.COM/SEMICONDUCTORS For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. . . . c n I , r o t c u d n o c i m e S e l a c s e e r F For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. Internet Connectivity with HCS12 16-bit . . . c Microcontroller using the n I , ACP Reference Design r o t c Designer Reference Manual — Rev 0 u d n o c i m e S by: Dr. Gerald Kupris, Motorola SPS, Munich, Germany. e Harald Kreidl l a Motorola SPS c Munich, Germany s e Dirk Lill e Steinbeis-Transfer Centre Embedded Design and Networking r University of Cooperative Education F Loerrach, Germany Prof. Dr.-Ing. Axel Sikora Steinbeis-Transfer Centre Embedded Design and Networking University of Cooperative Education Loerrach, Germany DRM049 — Rev 0 Designer Reference Manual MOTOROLA 3 For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. . . . c n I , r o t c u d n o c i m e S e l a c s e e r F Designer Reference Manual DRM049 — Rev 0 4 MOTOROLA For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. Designer Reference Manual — DRM049 List of Sections Section 1. emBetter — A Short Overview. . . . . . . . . . . .15 Section 2. Connecting Embedded Applications to the Internet. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19 . . . c Section 3. Basics of Implementation. . . . . . . . . . . . . . . .33 n I Section 4. Design Techniques for emBetter. . . . . . . . . .43 , r o Section 5. Overall Implementation of emBetter . . . . . . .49 t c Section 6. Layer Implementation of emBetter . . . . . . . .63 u d Section 7. Test environment . . . . . . . . . . . . . . . . . . . . .109 n o c Section 8. Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119 i m e S e l a c s e e r F DRM049 — Rev 0 Designer Reference Manual MOTOROLA List of Sections 5 For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. List of Sections . . . c n I , r o t c u d n o c i m e S e l a c s e e r F Designer Reference Manual DRM049 — Rev 0 6 List of Sections MOTOROLA For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. Designer Reference Manual — DRM049 Table of Contents Section 1. emBetter — A Short Overview 1.1 Protocol Suite. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15 . . 1.2 Target Platforms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16 . c n 1.3 Portability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16 I 1.4 Modularity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17 , r o 1.5 Scalability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17 t c u 1.6 Market positioning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17 d n Section 2. Connecting Embedded Applications to the o c Internet i m 2.1 Status and Trends . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19 e S 2.2 System Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21 e 2.3 Internet Connectivity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21 l a c s Section 3. Basics of Implementation e e 3.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33 r F 3.2 Packet Switching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33 3.3 Layered Protocol Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34 3.4 Client/Server Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39 3.5 Ports and Sockets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40 Section 4. Design Techniques for emBetter 4.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43 DRM049 — Rev 0 Designer Reference Manual MOTOROLA Table of Contents 7 For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. Table of Contents 4.2 Zero-copy Approach. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43 4.3 Unified Protocol Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . .45 4.4 Socket Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45 4.5 Callback Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .46 4.6 Blocking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47 Section 5. Overall Implementation of emBetter . 5.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49 . . c 5.2 Structure and Interfaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49 n I 5.3 Exception Handling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .55 , r o 5.4 Buffer Handling and Data Flow. . . . . . . . . . . . . . . . . . . . . . . . .56 t c u Section 6. Layer Implementation of emBetter d n 6.1 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .63 o c 6.2 Modem Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .63 i m 6.3 The Point to Point Protocol (PPP) . . . . . . . . . . . . . . . . . . . . . .72 e S 6.4 The Internet Protocol (IP). . . . . . . . . . . . . . . . . . . . . . . . . . . . .80 e l 6.5 The Internet Control Message Protocol (ICMP) . . . . . . . . . . . .83 a c 6.6 Socket Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .83 s e 6.7 Hypertext Transfer Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . .96 e r F 6.8 Handling of Web Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . .100 6.9 Simple Mail Transfer Protocol. . . . . . . . . . . . . . . . . . . . . . . . .102 6.10 UDP Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .106 Section 7. Test environment 7.1 Alarm Control Panel Reference Design . . . . . . . . . . . . . . . . .109 7.2 Setup of the Demonstration and Development Environment .109 Designer Reference Manual DRM049 — Rev 0 8 Table of Contents MOTOROLA For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. Table of Contents 7.3 Simulation environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . .112 Section 8. Sources 8.1 Web Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119 8.2 Literature. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .120 . . . c n I , r o t c u d n o c i m e S e l a c s e e r F DRM049 — Rev 0 Designer Reference Manual MOTOROLA Table of Contents 9 For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. Table of Contents . . . c n I , r o t c u d n o c i m e S e l a c s e e r F Designer Reference Manual DRM049 — Rev 0 10 Table of Contents MOTOROLA For More Information On This Product, Go to: www.freescale.com
Description: