Keil Logo

C166: CPU.22 ERRATA PROBLEM: Z FLAG AFTER PUSH AND PCALL


Information in this article applies to:

  • C166 All Versions
  • RTX166 All Versions

QUESTION

Some Infineon C16x devices contain a chip problem that is documented as CPU.22 problem. The Z Flag in the PSW might be corrupted after execution of PUSH or PCALL. Does the Keil C166 toolchain generate any instruction sequences that might create problems here?

ANSWER

The CPU.22 chip problems do not affect the Keil C16x Toolchain. Note that the Z Flag is the only side-effect of the CPU.22 chip problem. So, you must be careful of where your programs check its status.

In the Keil C16x Toolset, we have checked the following:

  • PUSH Instructions: The code generated by the C166 Compiler queries the Z Flag only after MOV, CMP, aritimetic, or logical instructions. It is never queried after a PUSH instruction.
  • PCALL Instructions: PCALL instructions are not generated by the C166 Compiler. This has been verified with all C166 V3.xx and V4.xx compiler versions. The upcoming V5.xx compiler is also not affected by the CPU.22 problem.
  • Libraries: The assembler portions of the C166 V3.xx and V4.xx Run-Time Libraries, the RTX166 Full Libraries, and the RTX166 Tiny Real Time Operating system contain no Z-Flag queries after PUSH or PCALL.

SEE ALSO

Last Reviewed: Monday, May 10, 2004


Did this article provide the answer you needed?
 
Yes
No
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.