background image

Appendix C

C.1 Schematics

TCP/IP Applications Using the MCF51CN Family—Designer Reference Manual, Rev. 0, 12/2009

47

Freescale Semiconductor

Summary of Contents for MCF51CN128

Page 1: ...TCP IP Applications Using the MCF51CN Family Designer Reference Manual Device Supported MCF51CN Microcontrollers Document Number DRM114 Rev 0 12 2009 ...

Page 2: ...TCP IP Applications Using the MCF51CN Family Designer Reference Manual Rev 0 12 2009 Freescale Semiconductor 2 ...

Page 3: ...tem Features 14 2 3 Connection Between Minimal System and Demo System Features 15 2 4 Hardware Block Diagram 16 2 5 Pinout Description 18 2 6 MCF51CN128 Reference Design Board Power Options 19 2 7 Hardware Considerations 20 2 8 Chapter 3 Firmware Description Firmware 21 3 1 Firmware Organization 21 3 2 Block Diagram 22 3 3 System Startup 23 3 4 Internal Functionality of Socket Layer 24 3 5 Chapter...

Page 4: ...Functionality 32 4 3 3 Serial Bridge Functionality 34 4 3 4 Principle of Operation 35 4 4 Serial Configuration Commands 36 4 5 Support 39 4 6 Appendix A Additional Files 41 A 1 Appendix B Bill of Materials BOM 43 B 1 Appendix C Schematics 47 C 1 TCP IP Applications Using the MCF51CN Family Designer Reference Manual Rev 0 12 2009 Freescale Semiconductor 4 ...

Page 5: ...etails about the technical implementation of the reference design main features refer to the following documents Application note titled Serial to Ethernet Bridge Using MCF51CN Family and FreeRTOS document AN3906 Application note titled Web Server Using MCF51CN Family and FreeRTOS document AN3928 Application note titled Email Client Using MCF51CN Family and FreeRTOS document AN3930 Application not...

Page 6: ...ing two serial bridges using the Internet An always enabled web page can configure all interfaces and bridge settings A reset command can be sent through the web page to make settings take effect The following settings can be changed or shown at runtime through the configuration web page or at compile time MAC address IP address IP mask address IP gateway address Server address to connect as a cli...

Page 7: ...k is not required Refer to Figure 2 5 for more details An accelerometer by SPI is on board to test SPI bridge HTTP Server Service Supports HTTP with the following services HTTP 2 0 Persistent connections or keep alive sessions SSI Server side include SSI directives AJAX Used to give the illusion that a web page changes without refreshing it FORMS POST request CGI POST request common gateway interf...

Page 8: ...The MCF51CN128 MCU can obtain power from connectors like the RJ45 and DB9 For support enter a service request at www freescale com support 1 4 Development Tools CodeWarrior V6 2 1 is used to download the software application A proper Ethernet cable must be selected depending on the Ethernet element that is the PC hub switch or router 1 5 Top and BottomView of the MCF51CN128 Reference Design Hardwa...

Page 9: ...erence Design FitsYour System The following figures show how the system fits into some TPC IP applications Specific features are explained in the Section Firmware The figures show reference design squared by a red box TCP IP Applications Using the MCF51CN Family Designer Reference Manual Rev 0 12 2009 9 Freescale Semiconductor Chapter 1 Introduction ...

Page 10: ...guration mode Figure 1 5 Web server implemented at MCF51CN family providing HTTP services one client at a time TCP IP Applications Using the MCF51CN Family Designer Reference Manual Rev 0 12 2009 Freescale Semiconductor 10 How the MCF51CN128 Reference Design Fits Your System ...

Page 11: ...client connecting to an SMTP server Figure 1 7 FTP server using FAT16 on an SD card TCP IP Applications Using the MCF51CN Family Designer Reference Manual Rev 0 12 2009 11 Freescale Semiconductor Chapter 1 Introduction ...

Page 12: ...TCP IP Applications Using the MCF51CN Family Designer Reference Manual Rev 0 12 2009 Freescale Semiconductor 12 How the MCF51CN128 Reference Design Fits Your System ...

Page 13: ...ystem 4 Provide the user with customizable hardware If only the Minimal System is required layout files from the MCF51CN128 reference design can be edited Therefore the Minimal System can be copied to a new hardware project Only a power source connection is required for the Minimal System 5 To reuse the Minimal System the same hardware components must be selected 6 The Demo System must be able to ...

Page 14: ... The MCU then feeds the Ethernet PHY clock 2 3 Demo System Features The following is the list of the Demo system main components Top view see Figure 1 1 Standard 2 3 BDM connector Serial header All serial signals are mapped Temperature sensor by IIC ADC Using a POT LED General purpose LED Power can be supplied from Power jack 5 5 V max Terminal block 5 5 V max Unused DB9 pin for power 5 5 V max Un...

Page 15: ...ce design hardware is divided into a Minimal and Demo system A set of zero Ω resistors that connect both these systems are present and visible at the top and bottom layers on the MCF51CN128 reference design hardware Disconnecting these registers isolate the Minimal system from the Demo system Figure 2 1 Board showing Minimal and Demo system TCP IP Applications Using the MCF51CN Family Designer Ref...

Page 16: ...color blue and the components related to the Demo System are shown in the color green Figure 2 2 MCF51CN128 reference design hardware block diagram The following figures show the main hardware components on the MCF51CN128 reference design hardware TCP IP Applications Using the MCF51CN Family Designer Reference Manual Rev 0 12 2009 Freescale Semiconductor 16 Hardware Block Diagram ...

Page 17: ... Figure 2 4 MCF51CN128 reference design bottom view Note The serial header is not populated in Figure 2 3 TCP IP Applications Using the MCF51CN Family Designer Reference Manual Rev 0 12 2009 17 Freescale Semiconductor Chapter 2 Hardware Description ...

Page 18: ...SSA 28 VDD4 37 VSS4 38 PHYCLK PTA0 3 MII_MDIO PTA1 4 MII_MDC PTA2 5 MII_RXD3 PTA3 6 MII_RXD2 PTA4 7 MII_RXD1 PTA5 8 MII_RXD0 PTA6 9 MII_RX_DV PTA7 10 MII_RX_CLK PTB0 11 MII_RX_ER PTB1 12 MII_TX_CLK PTB3 16 MII_TX_EN PTB4 17 MII_TXD0 PTB5 18 MII_TXD1 PTB6 19 MII_TXD2 PTB7 20 MII_TXD3 PTC0 21 MII_COL PTC1 22 MII_CRS PTC2 23 EXTAL PTD4 39 XTAL PTD5 40 TCP IP Applications Using the MCF51CN Family Desi...

Page 19: ...ce Design Board Power Options The following figure shows the power options for the MCF51CN128 reference design board The options are listed below Ethernet Brown and blue pairs take power Brown pair pin 4 and 5 is positive and blue pair pin 7 and 8 is negative The voltage drop due to the Ethernet cable length must be considered when carrying power through the RJ45 cable Note This is not power over ...

Page 20: ...sed exclusively µSD card reader and I2C temperature sensor rs232 hardware signals and second SPI port accelerometer sensor Accelerometer sensor and µSD card connector while containing a µSD card General purpose LED and second SPI port accelerometer sensor POT and second SPI port accelerometer sensor When using the Ethernet cable as the power supply the length of the cable must be considered due to...

Page 21: ...visible and configurable using a web browser All serial parameters must be configurable without recompiling the code Serial parameters must be configurable through the same serial interface Static and dynamic IP addresses must be available Web server must be able to show files from the µSD card Web server must support persistent connections Firmware must be able to send an email SD card files must...

Page 22: ...ess HTTP server with SD card support FTP Server with SD card support NOTE The SD does not work if the SPI configurator is selected FAT16 support NOTE The only difference between the serial bridge and configuration mode is the serial function bridge or configuration and the FTP server feature Configuration and reset can be requested at any time using a web page 3 3 Block Diagram The following figur...

Page 23: ... 255 0 Subnet Mask IP Address 192 168 1 1 Gateway IP Address 192 168 1 81 Server IP Address OFF DHCP Serial Bridge Options Configuration Mode Mode UART Bridge Serial Interface Server Server Client 1234 Port UART Options SCI2 UART Port 19200 Baudrate No Parity Parity 8 Bits Number of Bits 1 Stop Bit Stop Bit Software Flow Control SPI Options SPI2 SPI Port TCP IP Applications Using the MCF51CN Famil...

Page 24: ...escale123 Password smtp113 plus mail mud yahoo com STMP Server YES Authentication 3 5 Internal Functionality of Socket Layer The following figure shows the socket flow from the server and client perspective TCP IP Applications Using the MCF51CN Family Designer Reference Manual Rev 0 12 2009 Freescale Semiconductor 24 Internal Functionality of Socket Layer ...

Page 25: ...Figure 3 2 Socket flow diagram TCP IP Applications Using the MCF51CN Family Designer Reference Manual Rev 0 12 2009 25 Freescale Semiconductor Chapter 3 Firmware Description ...

Page 26: ...TCP IP Applications Using the MCF51CN Family Designer Reference Manual Rev 0 12 2009 Freescale Semiconductor 26 Internal Functionality of Socket Layer ...

Page 27: ... the programmed target Before downloading the firmware to the MCF51CN128 reference design hardware the M51CN128RD C macro must be selected The file name is m51cn128evb h Figure 4 1 Selection of the MCF51CN128 reference design hardware 4 3 Hardware Setup For hardware setup perform the following steps 1 The power supply must be between 3 7 and 5 5 V because of regulator limits To select a different ...

Page 28: ...tion page 3 SSI Example page 4 AJAX Example page 5 Tasks Status Example page 6 MCU features From this default web page the following pages are available If the MCU Configuration link is clicked or config shtml is requested from the browser the following web page shows the parameters that can be changed TCP IP Applications Using the MCF51CN Family Designer Reference Manual Rev 0 12 2009 Freescale S...

Page 29: ... configuration Another application that is available in the web server is an AJAX example The following figure shows what is shown in the browser when ajax htm is entered The application increments only the 8 bit counters and shows them graphically TCP IP Applications Using the MCF51CN Family Designer Reference Manual Rev 0 12 2009 29 Freescale Semiconductor Chapter 4 System Setup ...

Page 30: ...splayed showing valuable information like Task name Task state Amount of stack available for the task measured in longwords Figure 4 5 Tasks status on the MCF51CN128 TCP IP Applications Using the MCF51CN Family Designer Reference Manual Rev 0 12 2009 Freescale Semiconductor 30 Hardware Setup ...

Page 31: ...tual SMTP servers use secure socket layer SSL to correctly sign in and exchange information over a secure communication protocol Popular email service providers like Hotmail Yahoo or Google accept SSL File attachments to emails need to be considered in the future At the time of testing this software the following SMTP server is the only one that accepts regular requests without SSL smtp113 plus ma...

Page 32: ...uire PORT and NLST to work Table 4 1 Microsoft Windows command line FTP client implemented commands Description FTP client Displays files LS Copy a file from FTP server to FTP client GET filename Copy a file from FTP client to FTP server PUT filename Delete a file from FTP server DELETE filename Ends FTP session QUIT Shows description of FTP commands HELP The following figure shows an established ...

Page 33: ...ername user Password Freescale123 FTP server implementation has the following limitations Only allows one client and one transfer at a time FTP server was tested using only Microsoft Windows command line FTP client TCP IP Applications Using the MCF51CN Family Designer Reference Manual Rev 0 12 2009 33 Freescale Semiconductor Chapter 4 System Setup ...

Page 34: ... directories 4 3 4 Serial Bridge Functionality The Serial Bridge can work in two modes Configuration mode Serial interface UART or SPI is used to configure the serial bridge This is the default mode Bridge mode Characters received at serial interface are sent to Ethernet and vice verse The Ethernet side can be tested using HyperTerminal with the following information TCP IP Applications Using the ...

Page 35: ...ART or SPI settings go to Section 4 4 To configure the serial interface go to Section 4 5 4 4 Principle of Operation The Serial Bridge works in Configuration and Bridge modes The Web server interface works at all time but the serial configuration UART or SPI only works in the configuration mode The Serial Bridge starts with the following configuration Table 4 2 Reference design default parameters ...

Page 36: ...r Interrupt Handling 4 5 Serial Configuration Commands In configuration mode the serial configuration task is enabled The purpose of this task is to configure all the serial parameters stated in Section1 2 Key Features Default settings are stated in Table 4 2 The configuration is made through a set of commands that are sent using the UART or SPI interface These commands are sent from the data term...

Page 37: ... 0x50 board_get_uart_parity 6 1 0x50 board_get_uart_number_of_bits 7 1 0x50 board_get_uart_stop_bits 8 1 0x50 board_get_uart_flow_control 9 1 0x50 board_get_spi_port 10 1 0x50 board_get_spi_polarity 11 1 0x50 board_get_spi_phase 12 1 0x50 board_get_spi_master 13 1 0x50 board_get_spi_interrupt 14 1 0x50 board_get_email_authentication_required 0 2 0x50 board_get_bridge_tcp_port 1 2 0x50 board_get_sp...

Page 38: ...e_tcp_server 4 1 0xA0 board_set_uart_port 5 1 0xA0 board_set_uart_parity 6 1 0xA0 board_set_uart_number_of_bits 7 1 0xA0 board_set_uart_stop_bits 8 1 0xA0 board_set_uart_flow_control 9 1 0xA0 board_set_spi_port 10 1 0xA0 board_set_spi_polarity 11 1 0xA0 board_set_spi_phase 12 1 0xA0 board_set_spi_master 13 1 0xA0 board_set_spi_interrupt 14 1 0xA0 board_set_email_authentication_required 0 2 0xA0 bo...

Page 39: ...Command Name 0x88 Reset the Board Note Reset function returns zero if it was correctly received For example to ask for the serial s port configuration the following sequence must be sent Figure 4 9 Packet visual explanation The answer from the bridge means it correctly received the command and the UART port configuration is located at port number 1 All settings are reloaded as soon as the reset co...

Page 40: ...TCP IP Applications Using the MCF51CN Family Designer Reference Manual Rev 0 12 2009 Freescale Semiconductor 40 Support ...

Page 41: ...are DRM114SW zip Bill of materials BOM BOM 25981_A xls PDF schematic files SPF 25981_A pdf Hardware source files SCH 25981_A zip Hardware layout file LAY 25981_A zip Gerber files GRB 25981_A zip These files are provided free of charge to Freescale users TCP IP Applications Using the MCF51CN Family Designer Reference Manual Rev 0 12 2009 41 Freescale Semiconductor ...

Page 42: ...TCP IP Applications Using the MCF51CN Family Designer Reference Manual Rev 0 12 2009 Freescale Semiconductor 42 ...

Page 43: ...Appendix B B 1 Bill of Materials BOM TCP IP Applications Using the MCF51CN Family Designer Reference Manual Rev 0 12 2009 43 Freescale Semiconductor ...

Page 44: ...TCP IP Applications Using the MCF51CN Family Designer Reference Manual Rev 0 12 2009 Freescale Semiconductor 44 Bill of Materials BOM ...

Page 45: ...Figure B 1 Manufacturer BOM Report TCP IP Applications Using the MCF51CN Family Designer Reference Manual Rev 0 12 2009 45 Freescale Semiconductor ...

Page 46: ...TCP IP Applications Using the MCF51CN Family Designer Reference Manual Rev 0 12 2009 Freescale Semiconductor 46 ...

Page 47: ...Appendix C C 1 Schematics TCP IP Applications Using the MCF51CN Family Designer Reference Manual Rev 0 12 2009 47 Freescale Semiconductor ...

Page 48: ...TCP IP Applications Using the MCF51CN Family Designer Reference Manual Rev 0 12 2009 Freescale Semiconductor 48 Schematics ...

Page 49: ...TCP IP Applications Using the MCF51CN Family Designer Reference Manual Rev 0 12 2009 49 Freescale Semiconductor Appendix C ...

Page 50: ...Figure C 1 MCF51CN128 reference design schematics TCP IP Applications Using the MCF51CN Family Designer Reference Manual Rev 0 12 2009 Freescale Semiconductor 50 ...

Page 51: ...isclaims any liability including without limitation consequential or incidental damages Typical parameters that may be provided in Freescale Semiconductor data sheets and or specifications can and do vary in different applications and actual performance may vary over time All operating parameters including Typicals must be validated for each customer application by customer s technical experts Fre...

Reviews: