Other Parts Discussed in Thread: CC3100BOOST
Dear team
#if (INT_WDOG_ENABLED) /// Initialize the watchdog void watchdog_init() { U4 u4_temp; for (u4_temp = 0; u4_temp < 500000L; u4_temp++) ; SysCtlPeripheralEnable(SYSCTL_PERIPH_WDOG0); while(!SysCtlPeripheralReady(SYSCTL_PERIPH_WDOG0)) ; // Turn on stalling so the debugger doesn't reset the board. WatchdogStallEnable(WATCHDOG0_BASE); // Initialize the watchdog timer to an initial value of 6s WatchdogReloadSet(WATCHDOG0_BASE, g_SysClock*6); WatchdogResetEnable(WATCHDOG0_BASE); // Enable the reset. // WatchdogEnable(WATCHDOG0_BASE); // Enable the watchdog timer. This function is not called as this function & WatchdogIntEnable() are same } // Routine called from infinite loop in the main function to refresh the watchdog void watchdog_refresh(void) { WatchdogReloadSet(WATCHDOG0_BASE, g_SysClock*6); // Reload value is 6 seconds. So the time out for WatchDog Reset is 12 Seconds } #endif int main(void) { U1 u1_key_code; U4 u4_signature; BIT fl_led_on; SystemCoreClockUpdate(); // Update SystemCoreClock variable IntMasterDisable(); //Disable all interrupts init_devices_main(); init_flags(); init_variables(); init_modules(); // Initialize the various software modules used SysTick_Config(g_SysClock/1000-1); // Generate interrupt each 1 ms nvm_init(); u4_mscount = 0; u1_disp_data = 'A'; SCB->ICSR |= SCB_ICSR_PENDSTCLR_Msk; status_led_on(); error_led_on(); delay1(); status_led_off(); error_led_off(); delay1(); nvm_readSequence(ADR_SIGNATURE, (U1*) &u4_signature,4); if (u4_signature != U2_NVM_SIGNATURE) { u4_signature = U2_NVM_SIGNATURE; nvm_writeSequence(ADR_SIGNATURE, (U1*) &u4_signature,4); nvm_readSequence(ADR_SIGNATURE, (U1*) &u4_signature,4); if (u4_signature != U2_NVM_SIGNATURE) { uputs(0,3,20," EEPROM ERROR !!! "); disp_val(14,3,u4_signature,5,0); wait_1s(); wait_1s(); wait_1s(); } master_clear(U1_CALIB_ERASE); } else { load_settings(); load_results(); load_calibration(); load_configuration(); load_rules(); // Post NVM Load function calls RuleEng_decode_rules(); } IntMasterEnable(); //Enable all interrupts #if (INT_WDOG_ENABLED) watchdog_init(); #endif clr_display(); u1_disp_mode = U1_NORMAL_DISP_MODE1; fl_socket_connected = FALSE; fl_dump_socket_connected = FALSE; wifi_connection_status = WiFi_CC3100_connect2AP(); if (wifi_connection_status == 0) { if (WiFi_Socket_open() == 1) fl_socket_connected = TRUE; else fl_socket_connected = FALSE; } fl_led_on = FALSE; while (1) { #if (INT_WDOG_ENABLED) watchdog_refresh(); #endif do_process(); disp_led_status(); RtcReadTime(); if ((fl_socket_connected == TRUE) && (wifi_connection_status == 0)) { if (fl500ms_event != FALSE) { fl500ms_event = FALSE; if (fl_led_on == TRUE) { error_led_off(); fl_led_on = FALSE; } else { error_led_on(); fl_led_on = TRUE; } } } else { if (fl_led_on == TRUE) { fl_led_on = FALSE; error_led_off(); } else { fl_led_on = TRUE; error_led_on(); } } if (fl_socket_connected != TRUE) { if (WiFi_Socket_open() == 1) { fl_socket_connected = TRUE; } else { wifi_connection_status = WiFi_CC3100_connect2AP(); if (wifi_connection_status == 0) { if (WiFi_Socket_open() == 1) fl_socket_connected = TRUE; } } } } }
We would like take the technical support of TI for one of our product development with TI Microcontroller.
For Textile industries, we have developed a product with TI Microcontroller TM4C129ENCPDTI3R with CC3100BOOST and we have enabled the internal watchdog in TM4C129 with timeout period of 12 seconds to reset the system.
We understood in many cases, if there are timeouts the systems gets reset. But in few cases, the watchdog reset did not happen.
Please find attached the code (part) relating to the watchdog module (init, refresh etc).
Could you please check the possibility of this situation and support us to resolve this issue.