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.
Tool/software:
Hi,
In the device.c and device.h, there is DEVICE_DELAY_US functions. I call in my mainloop. I just wonder that I also set my Watchdog
SysCtl_setWatchdogMode(SYSCTL_WD_MODE_RESET); SysCtl_setWatchdogPredivider(SYSCTL_WD_PREDIV_2048); SysCtl_setWatchdogPrescaler(SYSCTL_WD_PRESCALE_8); SysCtl_serviceWatchdog(); SysCtl_enableWatchdog(); SysCtl_setWatchdogMode(SYSCTL_WD_MODE_RESET);.
1) Can DEVICE_DELAY_US function cause any watchdog reset?
2) If I increase time DEVICE_DELAY_US(500000), does my watchdog reset?
3) Is it safe to use DEVICE_DELAY_US in ADC interrupts?
4) In which condition, I shouldn't use DEVICE_DELAY_US?
Hi Gokhan,
Where are you trying to use DEVICE_DELAY_US in your application? What is your intended purpose? What are you trying to use a watchdog timer for?
It should be noted that the watchdog generates either a reset or an interrupt. It is clocked from the internal oscillator with a selectable frequency divider.
It should be noted that one of the watchdog's primary purposes is that it generates reset if CPU gets stuck in endless loops of execution. I would recommend using the DEVICE_DELAY_US if you are looking to introduce general delay in your application. The watchdog will force a device reset via driving XRSn pin low.
For more information on the Watchdog, checking out the academy section on the watchdog to understand more about its intended purposes. https://dev.ti.com/tirex/local?id=source_c2000_system_c2000_timers&packageId=C28X-ACADEMY
I also recommend that you check out the example watchdog examples available in C2000Ware. https://dev.ti.com/tirex/explore/node?node=A__AGy3Bxi2Nl9xQWDGQjK6jQ__C2000WARE__1kRFgrO__LATEST&placeholder=true
Regards,
Ozino