 | Technical Support |  |
|
|
Technical Support Support Resources Product Information | GENERAL: STARTUP DESIGNS FOR EMBEDDED PROGRAMS
Information in this article applies to: - C166 All Versions
- C251 All Versions
- C51 All Versions
QUESTIONAre 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? ANSWERYes. - 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. - 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. - 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. - 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. - Test Other Peripherals
You should probably test any peripherals that are required for proper operation of your target.
FORUM THREADSThe following Discussion Forum threads may provide information related to this topic. Last Reviewed: Saturday, July 09, 2005
|
|