Keil Logo

C51: XC800: 'Use multiple DPTR registers' may cause runtime errors


Information in this knowledgebase article applies to:

  • C51 Version 9.50a and earlier

SYMPTOM

You may experience runtime problems when the µVision option Use multiple DPTR registers in the dialog Options for Target — Target is selected for an Infineon XC8xx/TLE98xx device. This only happens when you also use extra register banks (directive using) in your interrupt service routines.

CAUSE

The µVision device database contained the option MOD517DP for all these devices. This directive tells the compiler to use up to 8 DPTR depending on the register bank selection. Since XC8xx/TLE98xx devices only have 2 DPTR, the DPTR content may get corrupted and xdata variables may show wrong values.

RESOLUTION

Do not select the option Use multiple DPTR registers in the dialog Options for Target — Target. If you want to use dual DPTR to speed-up xdata memory compare and copy functions, please specify the option MODP2 manually in the dialog Options for Target — C51 — Misc Controls.

STATUS

This will be fixed in all C51 versions later than 9.50a. If a project was created with a C51 version 9.50a or before, the device needs to be re-selected in the dialog Options for Target — Device to take over the new options.

MORE INFORMATION

  • Refer to MODP2 in the Cx51 User's Guide.
  • Refer to MOD517 in the Cx51 User's Guide.
  • Refer to Register Banks in the Cx51 User's Guide.

SEE ALSO

Last Reviewed: Monday, August 20, 2012


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.