|
|||||||||||
Technical Support Support Resources
Product Information |
C166: sprintf Converts Float Variables to Zero?Information in this article applies to:
QUESTIONWhenever 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? ANSWERYou 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. MORE INFORMATION
Last Reviewed: Thursday, February 25, 2021 | ||||||||||
|
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.