startup time is too long

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

startup time is too long

2,362 次查看
hotdog
Contributor I
i am using MC68HC908JL16 loaded with C program. alough using crystal oscillator:6MHZ, several dword variables and the STACKSIZE: 0x100, the chip starts up costing long time: 80ms. i suspect to cut down start08.c,maybe it can make the chip start up less than 1ms.
i would appreciate if anyone could instruct me to get it through,thank you.
标签 (1)
0 项奖励
回复
2 回复数

875 次查看
CrasyCat
Specialist III
Hello
 
I assume you are using CodeWarrior for your development.
According to your message it looks like the application is taking too much time initializing the global variables and the watchdog is generating a reset at startup time.
 
There are different ways to avoid that from happening:
  1- You can build your application (particularly the file start08.c) with option -D__ONLY_INIT_SP. This will
      disable initialization of global variables at Startup. In you are going that way, make sure to initialize all
      global variables through assignment in your application. 
  2- You can decide to disable initialization for some variables only (for instance you know that you are
       initializing some variables through assignment). Just define these variables in a user defined section
       and place it in a segment with attribute NO_INIT (instead of READ_WRITE).
  3- You can also adjust the startup code in the Start08.c source file and add some reset watchdog code
      in there to prevent COP to reset the CPU.
 
  If you are using another development tool chain than CodeWarrior you may have to go to your tool vendor and ask him how to fix that.
 
I hope this helps.
CrasyCat
0 项奖励
回复

875 次查看
bigmac
Specialist III
Hello,
 
I assume you are referring to the POR period.
 
For the JL device, it appears that the POR delay is determined by the internal oscillator signal ICLK, and this runs at approximately 50kHz.  Since the POR delay corresponds to 4163 cycles of ICLK, this would amount to about 80 milliseconds - what you are observing.  This delay cannot be reduced.
 
If you must have a shorter POR period, you might need to consider an alternative MCU device, perhaps one with a higher frequency internal clock.
 
Regards,
Mac
 
0 项奖励
回复