跳转到主内容
Knowledgebase
Home
Renesas Electronics China - Knowledgebase

How to automatically start a timer without running the program away?

Latest Updated:06/19/2006

Question:

When I automatically started a watchdog timer, the program run away. I executed a watchdog timer refresh in the main process.

Answer:

The RAM is also initialized in the start-up file (ncrt0.a30). It might need several tens of milliseconds to initialize the RAM because of the low-speed on-chip oscillator clock divided by 8 is automatically selected as the CPU clock after reset. Therefore, please refresh the watchdog timer in the following macro, too.


====================================================================

; NEAR area initialize.

;--------------------------------------------------------------------

; bss zero clear

;--------------------------------------------------------------------

  N_BZERO  	bss_SE_top,bss_SE

  N_BZERO  	bss_SO_top,bss_SO

  N_BZERO  	bss_NE_top,bss_NE

  N_BZERO  	bss_NO_top,bss_NO



;---------------------------------------------------------------------

; initialize data section

;---------------------------------------------------------------------

  N_BCOPY  data_SEI_top,data_SE_top,data_SE

  N_BCOPY  data_SOI_top,data_SO_top,data_SO

  N_BCOPY  data_NEI_top,data_NE_top,data_NE

  N_BCOPY  data_NOI_top,data_NO_top,data_NO
Suitable Products
R8C/18
R8C/19
R8C/1A
R8C/1B
R8C/20
R8C/21
R8C/22
R8C/23
R8C/24
R8C/25
R8C/26
R8C/27
R8C/28
R8C/29
R8C/2A
R8C/2B
R8C/2C
R8C/2D
R8C/2E
R8C/2F
R8C/2G
R8C/2H
R8C/2J
R8C/2K
R8C/2L