ARM Technical Support Knowledge Articles

PROGRAM HANGS CASTING INT TO FLOAT ON DALLAS 400

Applies to: C51 C Compiler

Answer


Information in this article applies to:


SYMPTOM

Casting an int with a value of zero to a float causes the program to stop responding on some Dallas 390 or 400 devices when the Arithmetic Accelerator is enabled.

CAUSE

With the Arithmetic Accelerator enabled, the C51 libraries use the Normalize function of the Dallas 390/400 to cast an int to float.  Some revisions of the Dallas 390 and 400 chips don't clear the MCNT1.7(MST) bit after normalizing an operand with a value of zero.  The routine is then caught in an endless loop.

RESOLUTION

To get around this inconsistency, the attached zip file contains replacement C51 floating point libraries which check for a zero operand. Download the file and extract it to your C:/KEIL/C51/LIB folder. Rebuild your project and the new library code should fix the error.

STATUS

Fixed in C51 V8.00a and later.

Article last edited on: 2005-10-14 09:04:03

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential