Part Number:CC2640
Tool/software: Code Composer Studio
So as all of you might know, the CC26xx family does not appear to have an actual watch dog.. Its more like a "watch cat", since it sleeps most of the time and therefore is quite useless in it's default configuration: When the CPU is in standby, there is actually no clock running to the WD, so it will never count down. So if your system is stuck in some semaphore for some reason, it will never come out of it.
So I'd like to discuss how to actually make it useful. First step would be to make it run in standby mode as well. As far as I can see you can do this with this command:
AONWUCMcuPowerDownConfig( AONWUC_CLOCK_SRC_LF );
This should enable the LF clock to the WD in standby mode. So far so good (I hope).
Now we have a next problem, it means that the WD will switch between LF en HF clocks, meaning that the WD counter is not very reliable. Also, there seems to be quite some contradiction between the information in the datasheet, specifically Figure 6-6, section 6.5.2 and section 6.5.2.3.
So what I'd like to do is before the device enters standby mode, it should scale down the watchdog counter to the appropriate value, and at wakeup, scale it back up. But to me, it's unclear what the scaler of the LF actually is? What is the best way to find out?