How do i know if Reset is from watchdog, i need to debug my device
The Watch Dog Timer can be enabled and started using the API, void CyWdtStart(uint8 ticks, uint8 lpMode), where, the parameter ticks can take the values,
Note that the lpMode parameter configures the "Low power mode configuration". It does not work on PSoC5 ES1 silicon.
Once the Watch Dog Timer is enabled, the watch dog timer needs to be cleared before it times out and resets the device. The same can be done using, CyWdtClear() API.
You can refer the system reference guide document to see explanations for the same APIs. It can be accessed from PSoC Creator under, Help --> Documentation --> System Reference Guide.
Attached is a simple project that implements watch dog functionality in PSoC 5LP. We need not place any components on our schematic for this. This can actually be done in firmware using two APIs:
The details on these APIs can be obtained from the System Reference Guide.
In this project first we enable the watch dog for a Time Period of 2.048 – 3.072 s. Now we need to make sure that the Watchdog is cleared before this time. If not, the device would get reset.
The attached project has been tested in our CY8CKIT-050 PSoC 5LP Development Kit. Toggle_Led would indicate that the device would get Reset and Toggle_Led_1 indicates that the device would not get Reset.
To test this project, first program this and we can see Toggle_Led blinking initially. Now suppose you do not press the switch ( which in turn would clear the Watchdog)in 3 seconds, you can again see Toggle_Led blinking indicating that the device got reset. On the other hand, in every 3 second if you press the switch, you can see Toggle_Led_1 blinking indicating that the device is not getting reset as pressing the switch would clear the Watchdog.
Hope this project helps!
Question was 2 1/2 years old. Probably already answered?Bob
Bob, to be a little more precise -
date difference:2 years 5 months 5 days
or 29 months 5 days
or 127 weeks 0 days
or 889 days
Then of course we could correct for Femto Sec, or the planck length and
speed of light, and the beat goes on.
Considered Daylight savings?