RTD driver version (R23-11 v1.0.0)
We are from the Quantum rfp team, working for the SAF9000 chip. We are trying to use RTD's-Wdg (watchdog) driver and see some issues like wdg calls trying to suspend all interrupts and then resuming interrupts.This is affecting some of the features. So wanted some support to help identify root cause/proper usage of wdg and fix the issues we are facing. Could you please support.
Current RTD Configuration we are trying to use are attached (wdg and platform xdm files):
wdg- in enable direct service mode.
using below calls:
For initialization:
Let me know in direct service mode the calls to be used to initialize and feed watch dog are correct or not?
Will any of these calls disturb any other interrupt, causing us other functionality issues?
Thanks Cuong.
To start with we started using indirect servicing, but since we were using GptChannelConfiguration_0 for some other timer purpose already, we could not use the same in wdg configuration for "Wdg External Trigger Counter " . We tried defining GptChannelConfiguration_1 in addition and tried to use it for "Wdg External Trigger Counter " in wdg tresos configuration, but it was not allowing it for some reasons(was getting red cross mark). That is when we switched to direct mode.
As per your suggestion i will try using function Wdg_43_Instance0_Service function. If problem persists then i will again try to use indirect servicing, and for configuration problem, i will approach you.
Hi @renukasc
I see that you used SetMode to feeding watchdog is wrong.
With direct service: use Wdg_43_Instance0_Service function
With indirect service: use Wdg_43_Instance0_SetTriggerCondition function.
Please check our example in Wdg module to refer how we use Wdg_43_Instance0_SetTriggerCondition
Path:
Furthermore:
Wdg_43_Instance0_Init((Wdg_ConfigType*)NULL_PTR) -> Using with Precompile, not Post-built
i could try using Wdg_43_Instance0_Service. Watchdog functionality fine as said before.If not fed , watchdog isr is triggering as expected.But problem is when watchdog apis are used,i could see it affecting all our other functinalities.Looks like it is affecting interrupts.
One more update, as indicated earlier when wachdog calls are used in our app, looks like other interrupts like timer(gpt) are not getting served, we dont get isrs triggering for this any more.
Tried changing priority of the interrupts,not helping.
Also tried commenting OsIf_SuspendAllInterrupts(), OsIf_ResumeAllInterrupts() in /RTD/eclipse/plugins/Rte_TS_T40D94M10I0R0/src/SchM_Wdg.c . This is also not helping.
@renukasc
When "Development Error Detection" is enabled, Wdg APIs use Wdg_ChannelValidateGlobalCall and Wdg_ChannelEndValidateGlobalCall.
These functions use SchM_Enter/Exit_Wdg_WDG_EXCLUSIVE_AREA_06 and SchM_Enter/Exit_Wdg_WDG_EXCLUSIVE_AREA_07.
Please verify in your SchM implementation how SuspendAllInterrupts and ResumeAllInterrupts behave. In particular: after ResumeAllInterrupts is called, do all interrupts return to their normal state?
what we finally observed when debugged is the normal timer interrupt will stop and will not resume if Wdg_43_Instance0_Init and Wdg_43_Instance0_Service calls are made with tresos configuration "Development Error Detection " is set.
When we disabled 'Development Error Detection ' in tresos, we observe that other interrupts are fine when enabled with wdg calls.