-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Watchdog is resetting the Controller for every 6 times of reset done by the NVIC_system reset() #34
Comments
Hi, Is it possible that WDT_RESET_COUNTER() is not executed when WDT is enabled after executing NVIC_System_reset()? |
Hi @Michael050492 , Thanks for the reply.
I have verified all the registers related to the WDT and System reset, But none of them shows any signs of interrupts raised for the WDT. Here is the NVIC_Sytem_reset() function : I have few questions to ask regarding this matter.
The strange behaviour is that today I removed all other features in our firmware and just rebooted the application start of the main(), Observation: With the above scenarion The WDT reboot happenend after just 2 NVIC_system_resets() and after that no sort of reboot happenned due to the WDT eventhough the system is continuosly rebooted by NVIC_system_reset(). |
I suggest to use SYS_ResetChip(), instead of NVIC_System_reset(). SYS_ResetChip() is M480 specific. |
@ychuang3 , Yeah we can use the SYS_ResetChip() but if you look at our Memory layout of the Flash memory as shown in below picture. If we perform SYS_ResetChip() everytime the Loader will be booted. So , we dont want the Loader to be booted thats why we are using NVIC_System_reset() as it will boot the application from 0x6000 address. |
The issue is that I am resetting the application using the function NVIC_System_reset() function whenever Our device does not connect to the Cloud application through the Ethernet then after every 6 iterations I will get a Log saying that Reboot has happened due to the Watchdog reset and I verified it using SYS->RSTSTS register.
Note: The issue does not occur when I perform the WDT_RESET_COUNTER(); before ding NVIC_system_reset();
I have verified all of the registers related to the WDT peripheral as per the User Manual and No clue is found regarding the issue with the relation of multiple NVIC system reset() and Watchdod reboot after booting Up.
Platform : Mbed OS
Compiler: ARM C6
I am using the m487sidae microcontroller and below code is the Initializations of the Watchdog and the WDT_IrqHandler() functions.
void mbed_sdk_init(void)
{
#if DEVICE_ANALOGIN
/* Vref connect to internal */
SYS->VREFCTL = (SYS->VREFCTL & ~SYS_VREFCTL_VREFCTL_Msk) | SYS_VREFCTL_VREF_3_0V;
#endif
}
WDT_IRQHandler function is below
void WDT_IRQHandler(void)
{
}
The text was updated successfully, but these errors were encountered: