ARM Technical Support Knowledge Articles

STARTUP DESIGNS FOR EMBEDDED PROGRAMS

Applies to: General Topics

Answer


Information in this article applies to:


QUESTION

Are there any things that my embedded program should do when it starts? For example, is there a POST or Power On Self Test that is standard that I should use?

ANSWER

Yes.

  1. C Run-Time Initialization
    This is the process that clears memory to 0 and initializes the contents of global variables. Fortunately, most of this is handled by the startup code that is provided with the Keil C Compilers. You should probably start a new project by copying the startup code (STARTUP.A51, START251.A51, or START167.A66) to your project directory and including it in your project. You may need to customize these files for your target system.
  2. Power Stabilization Delay
    In many systems, the CPU may start running before the power supply is completely stabilized. The easiest way to avoid reset problems due to noisy power systems is to insert a 100ms or so delay in the startup code. It is best to watch the power-up sequence with a digital storage scope to see how long this takes.
  3. ROM Checksum
    A ROM checksum is a method ot verifying that the program code is valid. This is an easy test to perform. Refer to GENERAL: GENERATING A ROM CHECKSUM for details.
  4. RAM Test
    A RAM test verifies that the RAM in your system is working. There are, of course, numerous ways to test the RAM in your system.
  5. Test Other Peripherals
    You should probably test any peripherals that are required for proper operation of your target.

Article last edited on: 2005-07-09 10:00:04

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