RS EDP CM XC167 Support Page
This Command Module is based on the 16bit Infineon XC167 microprocessor with onboard flash. This established microprocessor is supported by several debuggers. It can be used to monitor multiple I/O lines in real time and control all of the Application Modules available for the RS-EDP System.
A full suite of application software examples is available to exersise the system.
RS-EDP-CM-XC167 Module Features
| XC167 CPU Module | Part Number EDP-CM-XC167 |
|---|---|
| Features | Comment |
SAF-XC167CI-32F40F, 256k FLASH, 40MHz, 5V | 144TQFP, 256k on-chip FLASH |
Singe-chip boot but with optional 16 bit external bus | 16-bit mux bus |
64kx16, <25ns, 5V SRAM | Chipselect = CS1 |
1x CAN transceiver with PESD2CAN protection | CAN_CTRL |
8MHz XTAL | PLL multiplies to 40MHz |
CS8900 ethernet controller | Easyweb stack. |
2.5V core regulator |
|
32kHz XTAL for RTC |
|
I2C 3V3 to 5V level shifter | EDP I2C bus is 3V3 |
FTDI USB-JTAG and ASC1 interface | ASC1 may be connected to a virtual USB COM port via FT2232L |
Raw JTAG connector (0.05" socket) | Samtec FTSH |
4-DIL switch | Bootstrap, bootmode and other configurations |
User LED | Yellow (Port 4.3) |
Power LED | Blue |
ResetIN LED | Orange |
ResetOUT LED | Red |
Schematic Information
Mapping Of XC167 IO pins to the EDPCON1 & 2 connectors on the Baseboard
This is how the XC167 is connected up to the EDPCON 1 and 2 connectors to form the EDP "virtual CPU"
XC167 Development Tools
You are recommended to read the Getting Started Guide first!
The Infineon Device Access Server
All C166 tools are able to connect to the FT2232 USB-JTAG interface on the XC167 module. This is made possible by the Infineon Device Access Server (DAS). This low-level driver is included in some debuggers such as HitopXC so that its installation is automatic. Others like Keil uVISION and Tasking Crossview require the DAS server to be separately installed by the user.
Hitex HitopXC
HiTOPXC is a powerful debug and FLASH programming tool for the XC16x family. It is able to load and debug programs created with any C166 compiler. It has (optional) advanced features such as coverage analysis and real time performance analysis. HitopXC as a dedicated debugger automatically configures your PC with the Infineon DAS to work with the XC167 module’s built-in USB to JTAG interface. You are strongly advised to install HitopXC before any other XC development tool.
The HitopXC installer can be found on the EDP installation CD or here:
http://www.hitex.de/service/support/z-16x/20080528HITOP53-EDP-XC167setup.exe
Make sure the EDP system is not connected to your PC when installing. If there is an older version of the DAS already on your PC, Hitop will inform you and then upgrade it automatically. Once the installation has completed, power up the EDP system and connect the mini-USB port on the baseboard to your PC’s USB connector. Windows should detect the presence of the XC167 module and automatically load the drivers. HitopXC can then be used. The first program to try is the BLINKY example. This does nothing more than flash the yellow User LED on the module but it will prove that HitopXC is properly installed. You can find the blinky program here .
Compiler/Debugger IDE’s
The Keil uVISION compiler for XC166, the Tasking “Classic” and VX tools for XC166 can be used, however to date only Keil has been tested. The Keil C166 evaluation edition compiler can be found on the EDP CD or at:
https://www.keil.com/demo/eval/c166.htm
This allows the creation of programs of up to 8k executable code size. The uVISION debugger can make use of the FTDI FT2232 USB-JTAG interface on the XC167 module to access the OCDS1 debug unit on the CPU. The connection to the host PC is via the mini-USB connector on the EDP baseboard. It allows programs to be created of up to 8K.
There are a number of test programs available that make use of the I2C system, Ethernet, comms module and DC motor module. These programs are available as a ZIP file here. Note: The example program of the motor controller with web server does not compile with the limited Keil C166 compiler.
Setting Up The Keil C166 Compiler
All C166 tools are able to connect to the FT2232 USB-JTAG interface on the XC167 module. This is made possible by the Infineon Device Access Server (DAS). Thus before installing any debugger or compiler IDE, install the DAS v2.5 package. If you do not want to install the HitopXC debugger that contains the DAS then please install the DAS first.
If you have an existing DAS installation then you must use this latest version otherwise you may have difficulties getting the uVISION debugger to connect to the module.
Testing The Keil Tools
To test that the Keil tools are properly installed, open the BLINKY project in uVISION. Rebuild it and then before entering debug mode, use the FLASH tools menu to do download the program into the module. If this succeeds, go ahead and start debugging. If the FLASH download fails, unplug the USB cable and power down the EDP system for a few seconds. Then re-power it and insert the USB cable again. Wait for 60 seconds to make sure that Windows has detected the presence of the XC167 module. Then try the FLASH programming again.
Example Programs For EDP Fitted With The XC167 Module
These programs are designed to show the main features of the EDP system when fitted with the EDP-CM-XC167 CPU module. They are compiled with the Keil uVISION166 IDE and blown into the XC167 FLASH and debugged with either uVISION's own debugger or the advanced HiTOPXC debugger and performance analyser.
More examples are always being added to the EDP website so please make sure you check it!
XC167 Examples Supplied
Example programs for the XC167 module, using Keil tools are available here. These are referred to in the Getting Started guide. These are encrypted ZIP files with the password "edp".
BLINKY:
Simple program that flashes the user LED on the XC167 module at 1Hz.
CAN:
Simple program based on DAvE that sends and receives CAN messages between CAN0 and CAN1.
This requires a EDP-AM-CO1 comms module to be fitted.
EasyWEB:
Simple webserver that generates a webpage at 192.168.1.199 (alterable).
Hello_World:
Simple DAvE program that sends "Hello World" through XC167 ASC0. This requires a EDP-AM-CO1 comms module to be fitted.
I2C_DRIVER:
Large program that tests an entire EDP system. It has a simple menuing system that runs
through XC167 ASC0 so this requires a EDP-AM-CO1 comms module to be fitted.
Note:
C:\Hitex\HiTOP53-EDP-XC167\Examples\RS-EDP-CM-XC167\I2C_Driver\XC167\XC167_SYSTEM\I2C_INT.UV2
will only compile with the full Keil PK166 kit. If you are using the EK166 4K-limited version,
please open:
C:\Hitex\HiTOP53-EDP-XC167\Examples\RS-EDP-CM-XC167\I2C_Driver\XC167\XC167_SYSTEM\I2C_INT_8K.UV2.
This has the bulk of the program in a library to avoid hitting the 4k code limit.
PID_V3:
This requires the MC1 DC brushed motor controller, a Crouzet 12V motor and 1ppr encoder.
It reads the accel ramp pot. on the MC1 module and controls the speed of the motor using
a simple PID in the range of 0 - 3250rpm. It also generates a webpage at IP address
192.168.1.199 .
It will not compile with the EK166 limited compiler.
PID_V3_NoWeb:
This requires the MC1 DC brushed motor controller, a Crouzet 12V motor and 1ppr encoder.
It reads the accel ramp pot. on the MC1 module and controls the speed of the motor using
a simple PID in the range of 0 - 3250rpm.
It will compile as-is with the EK166 limited compiler.
PID_V3_Web:
This requires the MC1 DC brushed motor controller, a Crouzet 12V motor and 1ppr encoder. It reads the accel ramp pot. on the MC1 module and controls the speed of the motor using a simple PID in the range of 0 - 3250rpm. It also generates a webpage at IP address 192.168.1.199 .
Two projects are supplied:
- HITEX.UV2 is intended for the full PK166 package and is able to build a library that contains the TCP/IP stack.
- HITEX_8K.UV2 is designed for the EK166 limited compiler and uses this library
to get access to the TCP/IP stack without exceeding the code size limit.
EDP-CM-XC167 I2C Driver Library
To allow the creation of new programs that make use of the I2C devices used on the EDP system, as series of simple usage examples has been supplied. These can be found in the examples program package here:
These examples are simple programs that show the basic functions for accessing I2C devices used in the EDP system. The functions required to access the devices are held in the library "EDPXC167_LIB.LIB" held in the "LIB" subdirectory. The library has been built using the Keil XLARGE memory model for convenience and all the examples have been built the same way to avoid linking errors. The programs contain all the settings required for user’s own program development.
For most I2C devices, functions are available to use all the modes and features of the device, although they are not shown in the examples. Each example contains a text file which gives the details of all the functions listed in the device-specific header files.
I2C Driver Examples Supplied
AN16:
Setup AD5263 and MAX1138
Read all MAX1138 channels
Read all CPU ADC channels
DIO54:
Read all I2C GPIO inputs ("GPIO_IN_Pxx")
Write all I2C GPIO outputs ("GPIO_OUT_Pxx")
BaseBoard:
Read and write 24LC32 EEPROM
Read 8-way DIL switch
CO1-PCF8583:
Set real time clock time
Read real time clock
EE24LC32:
C166 Toolchains Not Tested
KPIT Cummins
Tasking Classic and VX




