How to disable watchdog

Source: Internet
Author: User

In Feature phone's production release version, (1) the system fails to capture memory dump or (2) watchdog timeout when the JTAG is used to analyze the problem. You can disable watchdog to debug the problem, the method for disabling is as follows:

 

The method of disabling watchdog in 11A before is to change the parameter in the WDT_Enable () function to kal_FALSE. As follows:

Application_Initialize () (init \ src \ init. c) like this:

# Ifdef _ PRODUCTION_RELEASE __

# Ifdef _ MULTI_BOOT __

If (system_boot_mode! = FACTORY_BOOT)

# Endif/* _ MULTI_BOOT __*/

// WDT_Enable (KAL_TRUE );

WDT_Enable (KAL_FALSE );

# Endif/* _ PRODUCTION_RELEASE __*/

 

The method of disabling watchdog after (including 11A) is to change wdt_data.fgEnable = kal_TRUE to KAL_FALSE. As follows:

Application_Initialize () (hal \ system \ init \ src \ init. c) like this:

# Ifdef _ PRODUCTION_RELEASE __

# Ifdef _ MULTI_BOOT __

If (system_boot_mode! = FACTORY_BOOT)

# Endif/* _ MULTI_BOOT __*/

// Wdt_data.fgEnable = KAL_TRUE;

Wdt_data.fgEnable = KAL_FALSE;

Init_dcl_wdt_handle = DclWDT_Open (DCL_WDT, 0 );

DclWDT_Control (init_dcl_wdt_handle, wdt_assist_enable, (DCL_CTRL_DATA_T *) & wdt_data );

DclWDT_Close (init_dcl_wdt_handle );

# Endif/* _ PRODUCTION_RELEASE __*/

 

If the content described above does not exist in Application_Initialize () (hal \ system \ init \ src \ init. c), but the WDT_SetValue (255) function exists,

The method to disable watch dog is: WDT_SetValue (255); replace it with WDT_Enable (KAL_FALSE );

 

Two feature options, FORCE_MEMORY_DUMP & FORCE_WATCHDOG_MUTE, are added to w12.36 11B to accelerate opening or disabling watch dog and memory dump. Modify the feature option in project make file and then remake system.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.