DK4 - Development Kit for M20-34
- Quick Start Guide

Conemtech S40 Socket Board

Kit content

In your kit you can find the following items:

  • M20-34 reference module
  • Socket board S40
  • USB Trace Adapter
  • Developer 7.2 on CDROM
  • 1x USB cable
  • 4x AMC-SMA cables
  • Quick Start Guide

Kit documentation

The DK4 kits are delivered with the following documents in printed form in the box:

  • C34 Development Kit Quick Start Guide

Additional documentation in electronic form available for this kit is available in the Software profiles downloaded with the profile e.g. the M20-34 version 2.4. Among other documents the following are included:

  • IEEE1588/PTPV2 User’s and Programmer’s Guide
  • C34 Product Brief
  • C34 Microcontroller Datasheet
  • C3 Family Microcontrollers Data Book
  • M20 Microcontroller Module Hardware Reference
  • S40 Socket Board Hardware Reference

After registration you can also download them from http://www.conemtech.com/Support/Online_Resources/Documents.html.


A complete documentation for the Developer 7.2 and for C34 profile, including C API Reference and Assembler Instructions, can be found inside the Developer Help system. Look under Help | Profiles Help | Please observe that these help resources are only available after you have installed the Software profile (see below).

Before you begin

Prepare a PC for use together with the DK4 Development Kit. In order to be used with this product, the PC should be equipped with Windows 2000 or Windows XP operating system and have at least one free USB port.

Installing the Developer software on your PC

The Developer is a powerful integrated development environment (IDE) for the C3 microcontroller family platform. A unique serial number is required for installing the Developer. You will find this number on a sticker attached to the Developer CD cover.

  1. Insert the Developer CD supplied with the kit into the PC and run the enclosed file “setup_imdev7x.exe”.
  2. Follow the on-screen instructions during the installation procedure.
  3. After the installation has completed, you will be asked to reboot your computer.

Installing the C34 profile

The Developer software can be used with any C3-core based hardware. The individualization of the hardware is handled via software “profiles”. These packages contain files and settings specific to each application class. In order to develop software for the C34 system, you first need to install its profile. In this case the version 2.4 of the software will be installed.

  1. Download the profile installation package from: http://www.conemtech.com/support/developerdata/setup_im3240m210_v24.zip
  2. Unzip and run the file “setup_im3240m210_v2xx.exe”.
  3. Follow the on-screen instructions during the installation.
  4. If the Developer SW was running during the installation, it must be restarted before you can use the new profile.

After restart you can check that the software profile was installed correctly by looking at the listed software profiles in the About box as well as under Help |Profiles of the Developer SW.

Connecting the socket-board

Before you can develop, run and debug any program on the C34 system, you have to connect it to the  PC. To do that, follow the steps below:

  • Attach the Trace Adapter’s flat cable to the socket-board’s red “Debug” connector. This connection is used by Developer to communicate with the C34 hardware and to provide the power for the board.
  • Optionally connect the socket-board to the network via a hub or a switch. You can also connect it directly to the PC, using a crossover Ethernet cable.
  • Finally, connect the Trace Adapter to the PC through the USB cable supplied with the kit. After connecting the “Found New Hardware Wizard” will appear on the PC.
  • Locate the drivers for the USB Trace Adapter on the Developer CD.
  • Proceed with the “Found New Hardware Wizard”, specifying the path to the driver files. After the drivers are installed, a USB Trace Adapter Serial Port device should appear on your PC.
  • Open the Device Manager from the hardware tab of the System Properties applet (Control Panel / System) and find this device under Ports (COM & LPT) node. Remember its name (e.g. COM3). You will have to use this port to interact with the on-board software, such as the command shell, either through the Developer’s terminal window or through any other terminal emulation software.

You may connect several USB Trace Adapters to your PC and debug several P40 systems simultaneously.  Each USB Trace Adapter is labeled with its own serial number that uniquely identifies this particular Trace Adapter within  Developer. 

Configure the Developer IDE

Now, you are ready to start using the Developer together with the DK4 Development Kit and the P40.

  • Start Developer.
  • Select Edit/Options from the Developer’s menu. Go to the Debug tab and specify “USB” as the Target Interface.
  • The list of available USB Trace Adapters identified by their serial numbers will appear in the drop-down box. Select the Trace Adapter you are going to use with this instance of Developer and press OK.
  • Open the Terminal window by selecting View/Debug Windows/Terminal from the Developer’s menu. Press the “Select Serial Port” button in the Terminal Window toolbar and specify the serial port you want to use (e.g. COM3). Serial ports that belong to USB Trace Adapters will be marked with the corresponding Trace Adapter’s serial number. Then press the “Connect” button.
  • Press the “Reset” button on the USB Trace Adapter.

Your C34 based system is delivered with the firmware pre-flashed, so you should be able to see an output from the socket-board in the Terminal window:
IM3240-M210 restarting @ Mon Feb  12:00:00 2010
Reading a:/system/ish.ini:    [OK]
Reading a:/system/system.ini:    [OK]
Serial server:            [OK]
Setting host name:        [OK]
TCP/IP startup:        [OK]
Registering hostname in DNS:    [FAILED]
FTP server:            [OK]
Telnet server:            [OK]
Setting timezone to:    GMT (DST)
Reading a:/system/startup.ini: [OK]

localhost.localdomain (IM3240-M210, v2.4)
Login:

  • To logon to the system the username is “root”, with password “root”.

The C34 system is configured to use a DHCP server for obtaining an IP configuration for its network interface. If the board is not connected to the network, or if you do not have access to a DHCP server, it may take a longer time to start-up.

You can also configure the network interface manually, by using the “ipconfig” command. Type the “help ipconfig” from the command shell to see the detailed command description. Type “help” from the command shell to see the complete list of commands supported.
 

Building a sample project

If you have configured your Developer and your C34 system boots successfully, you can now start the application development. Below is a short description of how to build and run a sample project within a profile:

  1. Start Developer.
  2. Select File/Open Profile Sample Project/<profile name> from the Developer’s menu. The Open Project dialog containing available sample folders. Double-click on a folder to and select the “.prj” file to open the sample project.
  3. In the Project View window you will see a list of the files included in the project. If there is a readme.txt file, open it and read the details about the project.
  4. Press “Build” button in the Developer toolbox (or press SHIFT+F6 key). You will then see the build process output in the Build Output window (Menu/View/Other Windows/Build Output). If the project was build without errors, you can boot the P40 system with the output file.
  5. Press the “Boot” button in Developer toolbox (or press F6 key). You will then see the boot process output in the Debug Output window (Menu/View/Other Windows/Build Output):

--- Configuration: Standard, Profile: IM3240-M210 v2.4 ---
Booting target
Trace Adapter: TA9B6D55
Reset done
Detected processor model: IM3000 (A)
Loading testmicroprogram: Tmpgm.mp (v0.0.268.0)
Detected memory type 97, size 32MB, mode 102
Loading microprogram: im3240m210.mp (v0.1.33.1)
Loading application: HelloWorld.gpx (address 00000000-000C65BB)
Program arguments: "HelloWorld.gpx -l"
Creating EFFS RAM disk...
RAM disk created, 512KB
c0start version: 2.0.1.0
Target successfully booted!
If you encounter any Timeout errors during the booting process of the IM3240 target, please:

  • Make sure that the P40 is powered (two green LEDs on S40 board are ON).
  • Make sure that the USB Trace Adapter is operational (green LED is ON).
  • Press the Reset button on the USB Trace Adapter and try to boot the target again.
  • Re-connect the USB Trace Adapter and try to boot the target again.

Using the PTP V2 engine

The C34 is designed to be a PTP V2 Grandmaster clock with the time and frequency source taken either from a GPS receiver or from any other equipment, which provides an accurate Pulse-Per-Second (PPS) signal and Time-Of-Day (TOD) information. It can also act as an ordinary master-slave clock when no PPS signal available.

Before using the C34 as a Grandmaster clock the time source equipment should be connected to the socket-board’s PPSIN and (optionally) TODIN connectors.

When the C34 is up and running you can start the PTP engine from the ISH command shell. Open the Terminal window, connect to the board and logon to the system. From the command line enter the “ptp2 start” command to start the PTP engine.

You can interact with the running PTP engine through the “ptp2” command interface, eg:

A:/root> ptp2 start 2

Commands

Command Description
ptp2 start [mode] 

Starts the PTP V2 engine in one of four possible modes:

0 – non-GPS mode. Only PTP is the time source
1 – GPS-only mode (default)
2 – GPS is the primary time source, PTP is the secondary
3 – PTP is the primary time source, GPS is the secondary
4 – Debug mode with GPS reference.

ptp2 stop 
Stops the PTP V2 engine.
ptp2 hmi 

Enters the HMI command processing mode of the PTP V2 engine.

To print a list of available HMI commands type “help” or “h”.

To leave the command processing mode and return to the shell type “quit” or “q”.

ptp2 [hmi_command]   

Sends an HMI command to the PTP V2 engine without entering the command processing mode.

To print a list of available HMI commands type “ptp2 help” or “ptp2 h”.

ptp2 pulse {parameters} 

Starts or schedules a pulse train output with specified parameters:
Time – time of the first pulse (absolute PTP time).
Width – width of the pulse.
Period – time interval between pulses.
Count – number of pulses to generate.
For example: “ptp2 pulse 0 0.001 0.01 0” starts an endless pulse train with 1ms pulse each 10 ms.

ptp2 pulse

Stops the running or cancels the scheduled pulse-train.

THIS COMMAND IS DEPRECATED. Use ‘pulsetime’ set of HMI commands instead.

ptp2 config [options] 

Configures the PTP V2 engine static parameters. Any combination of following options is possible:

-v [value] – VCO control range, in ns/s (default 6000)
-d [value] – VCO static drift, in ns/s (default 0)
-t [value] – main time constant, in sec (default 300)
-s [value] – startup time constant, in sec, 0 – off (default 0)
-p [value] – path delay time constant, in samples (default 300)
-q [value] – quality filter sample size, in samples, 0 – off (default 10)
-e [value] –  square threshold, in ns (default 400)
(none) – print currently configured values.

If static parameters need to be changed it should be done before starting the engine.

Re-flashing the C34 module

The DK4 is shipped with a tested P40 device and the latest software profile loaded. Whenever you like you can re-flash your C34 system using Developer IDE and the “FlashIt” project, which can be found under <IM3240_Profile_Path>ToolsFlashIt. But, please be aware that this is a sensitive process.The FlashIt project, its functionality and parameters are described in details in the “C3 Based Systems Firmware Installation and Upgrade” document that can be found under <IM3240_Profile_Path>docmanuals directory. Study it carefully before starting to flash anything onto the C34 target.

A short description of the procedure to re-flash the units is as follows:

  1. Open the FlashIt project in the Developer
  2. Set the correct MAC address in the mac.txt file. You can find the MAC address set at shipment of your module on the label pasted to the M20 module on the P40 unit. You are free to set your own under the international codex on how to issue MAC addresses to units.
  3. Disable the write protection of the flash memory. Observe that this latch is located in the Trace adapter. To disable the write protection, find the round hole on the side of USB Trace Adapter and press the button hidden inside with a sharp object like a paper clip. The LED on the Trace Adapter must turn from green to red when the write-protection is disabled.
  4. Boot the C34 with the FlashIt project and the flashing process will start automatically.

Contact us

Thanks for your interest. Click for your next step.

Conemtech AB
Torshamnsgatan 35
SE-164 40 Kista
Sweden

Project and Business Inquiries:

sales@conemtech.com

Support Inquiries:

support@conemtech.com

Conemtech
Copyright © 2013 Conemtech. All rights reserved. Privacy Policy