Phytec phyCORE-MPC5200B tiny Quick Start Instructions

Sps-kit
Hide thumbs Also See for phyCORE-MPC5200B tiny:

Advertisement

Quick Links

QuickStart Instructions
SPS-Kit
phyCORE-MPC5200B tiny
Using CoDeSys from 3S
Note: The PHYTEC SPS-Kit-Disc includes the electronic version of
®
the English phyCORE -MPC5200Tiny Hardware Manual
Edition: November 2006
A product of a PHYTEC Technology Holding company

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the phyCORE-MPC5200B tiny and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Phytec phyCORE-MPC5200B tiny

  • Page 1 QuickStart Instructions SPS-Kit phyCORE-MPC5200B tiny Using CoDeSys from 3S Note: The PHYTEC SPS-Kit-Disc includes the electronic version of ® the English phyCORE -MPC5200Tiny Hardware Manual Edition: November 2006 A product of a PHYTEC Technology Holding company...
  • Page 2 PHYTEC Messtechnik GmbH neither gives any guarantee nor accepts any liability whatsoever for consequential damages resulting from the use of this manual or its associated product. PHYTEC Messtechnik GmbH reserves the right to alter the information contained herein without prior notification and accepts no responsibility for any damages which might result.
  • Page 3: Table Of Contents

    1.2 Professional Support Packages available ........2 1.3 Overview of this QuickStart Instruction........3 5 min 1.4 Conventions used in this QuickStart ..........4 1.5 System Requirements ..............5 1.6 The PHYTEC phyCORE-MPC5200B tiny........6 1.7 Software Development Tool Chain ..........8 1.7.1 CoDeSys ................8 Getting Started..................9 2.1 Installing SPS Kit Software ............9...
  • Page 4: Introduction

    1 Introduction 5 min This QuickStart provides general information on the PHYTEC phyCORE-MPC5200B tiny Single Board Computer. It gives an overview of CoDeSys software development tool chain and instructions on how to run example programs on the phyCORE-MPC5200B tiny in conjunction with the CoDeSys development environment.
  • Page 5: Overview Of This Quickstart Instruction

    3) The “Debugging” section provides information on how to debug an application with the CoDeSys debugging features. In addition to dedicated data for this Rapid Development Kit, the PHYTEC Spectrum CD-ROM contains supplemental information on embedded microcontroller design and development. © PHYTEC Meßtechnik GmbH 2006...
  • Page 6: Conventions Used In This Quickstart

    At the beginning of each chapter you can find information of the time to pass the following chapter. You have successfully passed an important part of this QuickStart. You can find information to solve problems. © PHYTEC Messtechnik GmbH 2006 L-688e_2...
  • Page 7: System Requirements

    1.5 System Requirements Use of this "Rapid Development Kit" requires: • the PHYTEC phyCORE-MPC5200B tiny, • the PHYTEC Development Board with the included DB-9 serial cable and AC-to-DC adapter supplying 5 V DC/min. 1.5 • the SPS Kit disc, • PHYTEC Linux distribution based on OSELAS from Pengutronix •...
  • Page 8: The Phytec Phycore-Mpc5200B Tiny

    100-pin Molex SMT pin header connectors (pin width is 0.635 mm./25mil) lining the circuit board edges. This enables the phyCORE-MPC5200B tiny to be plugged like a “big chip” into target hardware. The standard memory configurations of the phyCORE- MPC5200B tiny features 64MByte DDR-SDRAM and 16MByte external Flash.
  • Page 9 Introduction phyCORE-MPC5200B tiny Technical Highlights • phyCORE dimensions 53 x 57 mm with two high-density 100- pin Molex SMT pin header connectors • Processor: Freescale Embedded PowerPC MPC5200B, 396 MHz clock Internal Features of the MPC5200B: • e300 core 760 MIPS at 400 MHz (-40 to +85 °C)
  • Page 10: Software Development Tool Chain

    The PHYTEC Development Board, in EURO-card dimensions (160 x 100 mm/6.25 x 4 in.), is fully equipped with all mechanical and electrical components necessary for the speedy and secure insertion of PHYTEC phyCORE-MPC5200B tiny Single Board Computer. Development Board Technical Highlights •...
  • Page 11: Getting Started

    • Insert your SPS Kit CD-ROM in you CD-ROM drive. The setup should be started automatically. If not, open an file explorer, navigate to your CDDROM/DVD drive and launch setup.exe manually • Click Next to proceed © PHYTEC Meßtechnik GmbH 2006 L-688e_2...
  • Page 12 If you decide to individually choose different paths you must consider this for all further file and path statements. We recommend that you accept the default destination location. © PHYTEC Messtechnik GmbH 2006 L-688e_2...
  • Page 13 CoDeSys in the menu Project\Options\Desktop. At the end you have to install the MPC5200 target files in CoDeSys. Click on • Start/Program Files/3S Software/CoDeSys V2.3/InstallTarget. © PHYTEC Meßtechnik GmbH 2006 L-688e_2...
  • Page 14: Downloading And Starting The Codesys Run-Time System On The Target

    ® SPS-Kit with phyCORE phyCORE-MPC5200 QuickStart Instructions Press Open, change to the directory C:\PHYTEC\SPS-Kit(MPC5200)\Target\Install and open the file 3S-OSADL-PLCLinux.tnf Choose the 3S CoDeSys SP OSADL-Linux on PPC entry and click on Install. Press Close. The setup of the SPS Kit is now complete. The demo applications were copied, CoDeSys is installed and configured to run with the MPC5200 tiny.
  • Page 15 “COM Direct” and advances you to the next HyperTerminal window. The COM Direct Properties window will now appear. Specify Direct to COM1/COM2 under the Connect Using pull-down menu (be sure to indicate the correct COM setting for your system). © PHYTEC Meßtechnik GmbH 2006 L-688e_2...
  • Page 16 Data bits = 8; Parity = None; Stop Bits = 1; Flow Control = None. • Selecting advances Direct– HyperTerminal monitoring window. Notice the connection status report in the lower left corner of the window. © PHYTEC Messtechnik GmbH 2006 L-688e_2...
  • Page 17: Setting The Jumpers On The Development Board

    Going through this QuickStart you have to setup some Jumper settings. You can see the right jumper settings on the following screenshot. If you don’t have these settings on your board set the jumper like shown in the screenshot. © PHYTEC Meßtechnik GmbH 2006 L-688e_2...
  • Page 18: Connecting The Host To The Target

    After connecting the board with the power supply the target starts booting. You should see the Linux boot messages in HyperTerminal When the target finished loading a login prompt should appear. Type root and enter. © PHYTEC Messtechnik GmbH 2006 L-688e_2...
  • Page 19: Configuring The Host

    • Select Internet Protocol (TCP/IP) and click Properties. • In the Internet Protocol (TCP/IP) Properties window, select Use the following IP address if not already selected and specify the new IP address you wish to use. Enter 192.168.3.10. © PHYTEC Meßtechnik GmbH 2006 L-688e_2...
  • Page 20: Configuring The Target

    In this section you will learn how to transfer files from your host PC to the target using windows file explorer and the ftp protocol. • Open the windows file explorer. • Enter in the address field: ftp://root@192.168.3.11/ © PHYTEC Messtechnik GmbH 2006 L-688e_2...
  • Page 21 When asked for a username type in root. A password is not required. • Open another windows file explorer • Change to the directory C:\PHYTEC\SPS-Kit(MPC5200)\RTS • Click on the file ppc-plclinux_rt and drag it to the explorer window with the ftp connection •...
  • Page 22: Running The Demo Application

    There is an entry MPC5200 with the setting TCP/IP and the IP address of the MPC5200. If you use another IP address on the MPC5200 tiny change the entry so it fits your settings. © PHYTEC Messtechnik GmbH 2006 L-688e_2...
  • Page 23 I/Os, right click on the root entry, select Append sub element and click on IO. Now right click on IO, select Append LED. In the Base parameters dialog enter %QB1234 in the field Output address. The PLC Configuration dialog will now look like this © PHYTEC Meßtechnik GmbH 2006 L-688e_2...
  • Page 24 Double-click on PLC_PRG. Here you can see how the LED is toggled by referencing the variable %QB1234. counter:=counter+1; %QB1234:=counter MOD 2; • Login in Online/Login A dialog appears that not program is on the controller. Press Yes to download the program. © PHYTEC Messtechnik GmbH 2006 L-688e_2...
  • Page 25 If the LED is not flashing please be sure that J17 on the carrier board is closed. Press Online/Logout to stop the demo. You now have successfully run your first demo application with CodeSys. © PHYTEC Meßtechnik GmbH 2006 L-688e_2...
  • Page 26: Getting More Involved

    Start CoDeSys if not already open. Click on File/Open Navigate to the demo directory C:\Phytec\SPS-Kit(MPC5200)\Demos\CAN Click on the project file CanDemo.pro Change to the tab sheet Resources and click on PLC Configuration. Click on the entry Can Device. © PHYTEC Messtechnik GmbH 2006 L-688e_2...
  • Page 27 Getting More Involved ____________________________________________________________________________ Bus identifier is the CAN interface on the MPC5200. CAN0 is the first interface. Select the tab sheet CAN settings. © PHYTEC Meßtechnik GmbH 2006 L-688e_2...
  • Page 28 PCL_PRG. This means, that every time the variables c and d are updated a PDO is sent with the value of the two variables as data. Click on the PDO 16#1800 entry on the right and press Properties. © PHYTEC Messtechnik GmbH 2006 L-688e_2...
  • Page 29 The program starts with a call to CanOpenWriteMSG( wDrvNr:= 0, dwCanID:= 16#70B, ucLen:= 2, bRtrFrame:= TRUE, pPointer8byte:= 0, ucByte1:= 0, ucByte2:= 0 ); Note that you can also send CAN packets directly via a library call. The parameters are: © PHYTEC Meßtechnik GmbH 2006 L-688e_2...
  • Page 30: Starting The Demo Application

    To start the CAN demo, press Online/Login and Online/Run. If the settings match your hardware devices, the CAN device will process the CAN messages. Press Online\Logout to stop the demo. You have successfully passed the Getting More Involved part of this QuickStart © PHYTEC Messtechnik GmbH 2006 L-688e_2...
  • Page 31: Debugging

    In the Options dialog click on build and check Debugging. Start the run-time system on the MPC5200 if not already running. Start HyperTerminal, login to the MPC5200 and type ./ppc-plclinux_rt. The run-time system should start now. Press Online/Login © PHYTEC Meßtechnik GmbH 2006 L-688e_2...
  • Page 32: Setting A Breakpoint

    4.2 Setting a breakpoint Set a breakpoint by clicking left of a source code line, for example in the line with the code d:=d+1 The program stops. You can now execute a single command by pressing F8. © PHYTEC Messtechnik GmbH 2006 L-688e_2...
  • Page 33: Visualization

    Select PLC_PRG.a and click on the >> symbol. The entry is added to the new inserted Receive PDO. Select the newly created index under the Receive PDO and click on Properties. © PHYTEC Meßtechnik GmbH 2006 L-688e_2...
  • Page 34 Select Colors and click on the button Inside in Alarm Color. Select red as the fill color. Select Variables and enter PLC_PRG.a in the field Change color. Close the dialog and save the changes. Click on Project/Rebuild all to compile the project. © PHYTEC Messtechnik GmbH 2006 L-688e_2...
  • Page 35 POD with the specified COB-ID the program copies the data in this packet in variable a. If the variable is greater than zero, the LED should become red. Please refer to the CoDeSys manual for further information about visualization. © PHYTEC Meßtechnik GmbH 2006 L-688e_2...
  • Page 36: Min

    Press Online/Login Press Online/Run to start the example. Now you have to create the bootproject. Press Online/Create Bootproject. This will automatically copy all necessary files to the target. Press Online/Logout. Press File/Exit to close CoDeSys. © PHYTEC Messtechnik GmbH 2006 L-688e_2...
  • Page 37: Starting The Program When Booting The Target

    The run-time system is startet via the autologin tool that is part of the PHYTEC Linux distribution. You just have to configure the config file for the autologin tool and start the tool via an additional entry in the file inittab The inittab file describes which processes are started at bootup and during normal operation (e.g.
  • Page 38 In the file, you´ll see the following line: console::respawn:/sbin/getty –L 11520 /dev/ttyPSC2 vt100 Place the cursor at the end of this line, press i to enter insert mode of vi and press return. In the new line enter © PHYTEC Messtechnik GmbH 2006 L-688e_2...
  • Page 39: Writing I/O Drivers

    You can find the necessary driver templates and makefile installed on your hard disk in the folder C:\Phytec\SPS-Kit(MPC5200)\RTS\IODrivers. For this to work you’ll need a Linux development system. Please refer to the MPC5200 Linux Kit disc that comes with the SPS Kit. On the disc you’ll find a quickstart instructions that describes how to...
  • Page 40: Summary

    The Debugging part of this QuickStart gave you information on setting up and using the debugger with CoDeSys. You learned how to set breakpoints, watching and changing variables content and use the Visualization feature. © PHYTEC Messtechnik GmbH 2006 L-688e_2...
  • Page 41 Suggestions for Improvement Document: SPS Kit with phyCORE-MPC5200B tiny, QuickStart Instructions Document number: L-688_2, November 2006 How would you improve this manual? Did you find any mistakes in this manual? page Submitted by: Customer number: Name: Company: Address: Return to:...
  • Page 42 Published by © PHYTEC Messtechnik GmbH 2006 Ordering No. L-688e_2 Printed in Germany...

Table of Contents