|ARM Technical Support Knowledge Articles|
Applies to: C166 C Compiler
Information in this article applies to:
Whenever I try to format a Float variable using SPRINTF, the resulting string is zero. The values to be converted are within the floating-point limits. This only happens when I use my own startup code. What could be causing this?
You are not initializing the DPP1 and DPP2 registers in your startup code. Although your program does not use them, the C compiler requires that these registers are initialized during start up.
We strongly urge you to use the START167.A66 or START_V2.A66 file that we provide as the basis for your startup routines. The Keil startup code performs the following operations:
Your startup code must do all of these. If it doesn't, you may encounter run-time problems that are difficult to debug and diagnose.
Article last edited on: 2005-07-15 10:10:11
Did you find this article helpful? Yes No
How can we improve this article?