Keil Logo

ULINK: OCDS: Program Counter moves to Incorrect Values

Information in this article applies to:

  • C166 Compiler V4.27 or higher
  • ULINK2 USB-JTAG Adapter


I am using the Infineon XC16x Starter Kit with OCDS debugging. I have started with ..\C166\EXAMPLES\BOARDS\Infineon XC16Board which is included as a sample project in the Keil C166 toolchain.

If I launch debugger without loading the Blinky application, I can change DP9 and P9 via the Peripheral dialog and see the LED on the board turning ON and OFF.

However, when I load the application, I have the following strange behaviour:

  • I cannot step or break (the PC moves always to 0xffffff)
  • With the command 'run to cursor' the program counter moves correctly, but instructions are not changing any register or SFR values.
What can I do?


We have seen this problem when the chip configuration does not match the project configuration. Therefore, you should verify the jumper settings as described in the ABSTRACT.TXT file of that project.

For example when S106.4 is OFF (internal boot) instead of ON, the board behaves exactly as you have described.


Last Reviewed: Sunday, February 7, 2021

Did this article provide the answer you needed?
Not Sure
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.