C51: CHECKING TOOL FOR XC800 CHIP BUG
Information in this knowledgebase article applies to:
Is there a checking tool for the SYS XC8.001 problem that is present in the Infineon XC800 (in example XC888 or XC886) devices? Are these instructions generated by the C51 Compiler?
Yes, the instruction is generated by the C51 Compiler. It actually is very rare and depends on the way you assign results to an SFR register. To avoid the instruction you may change the source code and assign the value to a temporary variable before the final assignment to the SFR register.
For existing code you may check the image with the attached mddfind scanning tool for the erroneous instruction. The checking tool is invoked with the output file of the LX51 or BL51 Linker/Locoter.
When erroneous instructions are detected a similar output is generated:
Looking for 'MOV dir,dir' with 'dir >= 0x80': ?C_STARTUP - 0x000001A1: MOV 0xA0,0xCC ?C_STARTUP - 0x000001A5: MOV 0xD2,0x90 ?C?LSTKXDATA - 0x00000102: MOV 0xF1,0x83 3 'MOV dir,dir' found.
According to the Infineon Errata Sheets, not all SFRs are affected by this errata. The mddfind utility checks for MOV dir,dir instructions (code 0x85) where the source address is >= 0x80 (=SFR) and the destination SFR address is one of the following: 0x9A, 0x9B, 0x9C, 0x9D, 0x9E, 0x9F, 0xA0, 0xA4, 0xA5, 0xA6, 0xA7, 0xAB, 0xB0, 0xB4, 0xB5, 0xB6, 0xB7, 0xBB, 0xBC, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC8, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD2, 0xD3, 0xE9, 0xF1, 0xF2, 0xF4, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE and 0xFF.
These SFRs are mentioned in the following Infineon errata sheets:
Note that the mddfind utility can not check the selected SFR page at the time when a MOV dir,dir instruction is executed. Therefore, mddfind may report instructions which are not critical because they refer to a different SFR page. Check all these reports carefully in your source code against the Infineon errata sheet.
The attached mddfind scanning tool was updated to version 3.84 on 14th of August 2015. The previous version 3.74c from 2009 did not report SFR accesses to the address 0xB4, 0xB5, 0xB6, 0xB7, 0xBB, 0xBC, 0xA0, 0xAB, 0xB0 and 0xC6 because prevous Infineon errata sheets did not specify them as critical.
To automate the checking apply the following changes to your µVision project:
To locate the source code that causes the problem you can load the application into the µVision Debugger. When you select Use Simulator under Project - Options for Target - Debug no target hardware is required. Then perform the following steps:
Request the files attached to this knowledgebase article.
Last Reviewed: Friday, August 14, 2015
of your data.