XC16x Devices
OCDS debugging is fully supported on Infineon XC16x devices.
Using the Infineon XC16Board
On the Infineon XC16Board you need to set Jumper JP501 ON to use the LPT/OCDS interface (Wiggler). When Jumper JP501 is OFF the OCDS connector is enabled and you can connect the XC16Board to the Keil ULINK.
An example application that is configured for OCDS debugging with the Infineon XC16Board is available in the folder: ..\C166\EXAMPLES\BOARDS\Infineon XC16Board. For running this example application, you should set the DIP switches on the XC16Board to the following settings:
| DIP Switch | Settings for XC16Board Revision 2.0 |
|---|
| S101 | 1:Off 2:On 3:On 4:Off 5:Off 6:Off 7:Off 8:Off |
| S102 | 1:Off 2:Off 3:On 4:On 5:On 6:Off 7:Off 8:Off |
| S103 | 1:Off 2:On 3:Off 4:Off 5:Off 6:Off 7:Off 8:Off |
| S106 | 1:Off 2:Off 3:Off 4:On |
Using an OCDS Connector
An OCDS connector can be easily added to user hardware. The OCDS interface allows application debugging and programming of on-board Flash ROM devices. The Infineon XC16x device should be wired to the OCDS connector pins as described in the following table.
| Pin | Connected to ... |
|---|
| TMS | TMS pin; use 100KOhm pull-up resistor to VCC |
| TDO | TDO pin |
| CPUCLK | not used on KEIL ULINK |
| TDI | TDI pin; use 100KOhm pull-up resistor to VCC |
| TRST | TRST/ pin; use 100KOhm pull-down resistor to GND. |
| TCK | TCK pin; use 100KOhm pull-up resistor to VCC |
| BRKIN | BRKIN pin; use 100KOhm pull-up resistor to VCC; not used on KEIL ULINK |
| TRAP | not used on XC16x Devices |
| VCC | Supply Voltage (+5V) |
| GND | Digital Ground |
| RESET | RSTIN/ pin; use 100KOhm pull-up resistor to VCC |
| BRKOUT | BRKOUT pin |
| OCDS | not used on XC16x Devices |
The pins TMS, TDO, TDI, TCK, BRKIN, BRKOUT may share I/O Port pins on some XC16x device variants. The pins TRST and RESET are open collector outputs on KEIL ULINK with 10KOhm pull-up resistor to 3,3V (VCC).
OCDS Driver for XC16x — Settings
When you have selected Use: OCDS Driver for XC16x under Project — Options for Target — Debug you can open the Settings dialog. The Settings dialog of the OCDS Driver for XC16x allows configuration of device specific options.

JTAG Interface
Select LPT Printer Port or Keil ULINK (USB Adapter). If your computer has multiple ULINK adapters connected you need to select the serial number of the ULINK interface you want to use for debugging.
Cache Options
These controls improve the performance of the µVision Debugger during target debugging by caching target memory areas in the PC memory. By default, these options are enabled to get maximum performance.
- Ignore Code Modifications informs the debugger that the downloaded program code will not changed. µVision will therefore never read the program code from the target system. Disable this option if you are using self modifying code or if you have the impression that the program code is overwritten in your application.
- Cache Memory selects that the memory content is considered to be unmodified during a program stop until the next single step, procedure step or go command is executed. Disable this option if you want to see the actual memory content (for example the data content of memory mapped peripherals) even if the debugger is halted.
- Cache SFR Space is the same as Cache Memory for the SFR memory area 0xF000 – 0xF1FF and 0xFE00 – 0xFFFF.
Reset Configuration
To download application code into external memory devices it is required to initialize the External BUS Controller on the XC16x device. This dialog section allows you to enter values for the EBCMODx, TCONCSx and FCONCSx registers. This registers will be directly initialized with OCDS commands to enable external memory devices.
Known Problems with OCDS on XC16x Devices
- The program counter value (PC $) cannot be modified.
- The LPT interface provided on the Infineon XC16xBoard does not work stable on some high-speed PC hardware.
Related Knowledgebase Articles