This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
The main reason for a watchdog is to ensure the device is kicked up again if it has crashed by external influences like ESD. A watchdog is not meant to ensure proper software working.
So the default setup for a watchdog is 1) runnihng and 2) resetting the device if a watchdog timeout happens. No ISR is needed at all.
However, if you are sure you don't want he watchdog resetting your device, you can configure it to act as a simple delay timer. In this case you can decide whether you want it to trigger an ISR if the timer expires (then you'll need an ISR and need to set the WDTIE bit) or jsu twant to look up if the time rhas expired (by checking the WDTIFG bit)
However, the main purpose of the WDT is to reset the device if it doesn't respond for some reasonl This includes the low power mode. The watchdog will continue running even if the rest of the MSP is sleeping (if you used VLO as WDT source, then even in LPM4, else you may switch the WDT clock source off, stopping the WDT). If the MSP doesn't wake up in time, then the WDT will be triggered. And reset the MSP (in watchdog mode) or wake the MSP for execution of he WDT iISR (in timer mode with WDTIE set) or do nothing (if disabled, or in timer mode and WDTIE clear)
If you do WDTCFG = WDTPW|WDTHOLD; the WDT is disabled and won't do anything anymore. And not reset the MSP.
Dear Jean Michael Gross, from what I see in the datasheet or in the user guide,
when the uC is in LPM4 all clocks are OFF so how can the watchdog reset the
mcu when the uC is in LPM4?
"Low-power mode 4 (LPM4)
– CPU is disabled
– ACLK is disabled
– MCLK and SMCLK are disabled
– DCO's dc generator is disabled
– Crystal oscillator is stopped"
Is VLO active in LPM4? Reading http://www.ti.com/lit/ug/slau144i/slau144i.pdf
on page 281 par 5.2.2
there is written: "The OSCOFF bit disables the VLO for LPM4"
Ernesto Leali said:on page 281 par 5.2.2
there is written: "The OSCOFF bit disables the VLO for LPM4"
Looking at the blovk diagrams, this is true for the AFE2x devices which do not have an LFXT1. On the 'normal' 2x devices, OSCOFF disables XT1, and VLO is unaffected by OSCOFF.
I added this to my list of documentation quirks
VLO should be active on LPM4 except onthe AFE2x devices (where this is the only difference between LPM3 and LPM4, as VLO is the only source for ACLK on these parts).
My English is not very good so maybe I didn't understand what you were saying; If i correctly understood you are saying that VLO doesn't goes off in LPM4 in my case. Everywhere is written that in LPM4 all clocks are off so also VLO should be off. Am I mistaken? Look for example on page 42 of the same document.
Well, it's a semantics issue.Ernesto Leali said:Everywhere is written that in LPM4 all clocks are off so also VLO should be off.
VLO is no clock. Clocks are SMCLK, MCLK and ACLK. VLO is an oscillator, a clock source. So the cited sentence is correct even if VLO is not off. In fact, the main purpose for the existence of VLO is that it draws so few current hat it can remain on all the time and serve as a lowcost (low current but also low precision) timebase even if everything else is off.
The only situation where I would assume VLO to be off is in LPM4.5, where even RAM retention is disabled and a wakeup requires a cold boot, bu tthe ports pins are still active and sensitive for interrupts.
Hmm, since I don't have revision i at hand, I can only guess what you're referring to. There's Fig. 2-9, Table 2.2 and chapter 2.3.1. Nowhere there I see 'VLO' mentioned. Always explicitely SMCLK, ACLK, MCLK and DCO (which actually is a clock source too and not clock signal).Ernesto Leali said:Look for example on page 42
Hi,
1) I'm using MSP430FR5949 controller, every 20ms I'm enetring into LPM3 and exiting. Will this cause any issue??
As my program is hanging and WDT reset is happening.
2) since in LPM3 all clocks are disabled, is it required to externally disable and enable peripherals on LPM3 entry and exit??
Thank you,
Thank you for your reply,
LPM3 wakeup is from
1) port interrupts( my port interrupts(4) will happen every 20ms i.e, 20ms my device will be in LPM3 and 20ms in AM)
2) RTC interrupt(every 1 minute)
I have disabled watch dog while entering LPM3, now my program is hanging their itself, it is not exiting from LPM3.
**Attention** This is a public forum