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.

AM2634-Q1: [MCAL]WDT example

Part Number: AM2634-Q1

Dear Champs,

Could you please let me know if there is WDT example in MCAL v9.0.1?

When my customer tried to implement WDT using MCAL v9.0.1, they found there is no wdt_irq.c in MCAL v9.0.1. Where they can find it?

When they tried to decrease RTI0_RTIDWDCNTR  register value, they failed to reset HW.

When they tried to use Settriggercondition  API, they also failed to reset HW.

So, they would like to implement WDT using MCAL v9.0.1 and how they can register interrupt for WDT. could you please check this?

Thanks and Best Regards,

SI.

  • Hi SI,

    We do have an WDT example. Please find at below location.

    $MCAL_AM263x_09.00.01_INSTALL_DIR\mcal\examples\Wdg\WdgApp.c

    WDG Ug: software-dl.ti.com/.../wdg.html

    BR,

    Sunil

  • Hi Sunil,

    Unfortunately it is hard for them to utilize WDT example and want to know if they can use interrupt with WDT.

    Could you please let them know how they can use interrupt with WDT?

    And, it seems mode can not be changed through Wdg_SetMode API. Could you please check this API?

    Thanks and Best Regards,

    SI.

  • Hi Sunil,

    When they checked the code, it seems Wdg_SetMode was not implemented properly at current MCAL version.

    Could you please let me know if this is right and when Wdg_SetMode API will be implemented properly?

    When they checked the code of 'Wdg_SetMode()' function, they could not find any code to set watchdog mode.

    Thanks and Best Regards,

    SI.

  • Hi ,

    As our expert Sunil is OOO this week, please expect a delay on his response.

    In the meantime, 

    Wdg_SetMode was not implemented properly at current MCAL version

    I can confirm that this API for Watchdog is not completely supported right now as it only checks for any DEM and DET errors and updates internal driver status.

    I'm not totally certain, but this mode switch is mentioned under "Features Not Supported" column of the following tables: 

    stating that the Mode and Timeout cannot be modified if the watchdog is running due to hardware limitations, which is a possible reason for such an API at this stage.

    they found there is no wdt_irq.c in MCAL v9.0.1. Where they can find it?

    Watchdog IRQ files were removed after MCAL v08.06.02, so even MCAL v09.00.00 didn't include them. Although per-instance IRQs present in those files were used to call Wdg_Trigger() API, and it shall be worked on at a later stage.

    it is hard for them to utilize WDT example and want to know if they can use interrupt with WDT

    From the example flow (also noted in the user guide: 4.19. WDG — Platform MCAL Development - AM263 User Guide (ti.com)), 

    WDG supports Interrupt triggers, and it can be serviced using the Wdg_SetTriggerCondition API to update the non-zero timeout value and extend the duration of system reset.

    I hope it helps.

    Regards,
    Harshit

  • Hi Sunil,

    Could you please let me know when 'WDGIF_OFF_MODE', 'WDGIF_SLOW_MODE', 'WDGIF_FAST_MODE' will be implemented on our WDG MCAL driver as specified in autoSAR standard?

    they found there is no wdt_irq.c in MCAL v9.0.1. Where they can find it?

    Watchdog IRQ files were removed after MCAL v08.06.02, so even MCAL v09.00.00 didn't include them. Although per-instance IRQs present in those files were used to call Wdg_Trigger() API, and it shall be worked on at a later stage.

    And when Watchdog IRQ willl be supported as described in above?

    Hi Harshit,

    Thanks for your answers. it would be very helpful.

    Thanks and Best Regards,

    SI.

  • Hi Harshit, Sunil,

    My customer concerned how they can set watchdog mode to 'off' in programming session or in entering sleep sequence if 'off_mode' is not supported and mode can't be modified while running. Could you please let me know how they can set watchdog mode to 'off' in programming session or in entering sleep sequence?

    Thanks and Best Regards,

    SI.

  • Hi SI,

    Please find the answers for the above queries you had.

    1. Regarding WDG Set Mode Implementation

    [Sunil] Wdg driver cannot support Wdg_SetMode feature due to hardware IP limitation. Please refer below for more details.

    Please refer section 13.5.1.4.1 RTI Digital Windowed Watchdog in below user guide.
    Configuration of DWWD: The DWWD preload value (same as DWD preload) can only be configured when the DWWD counter is disabled.

    Please refer section 4.19.29.1 MEM_RTIDWDPRLD Register in below user guide.

    2. Watchdog IRQ implementation

    [Sunil] Please refer [SWS_Wdg_00166] in below SWS specification.

    The routine servicing an internal watchdog shall be implemented as an interrupt routine driven by a hardware timer

    Also please refer section 9.2 Data exchange between watchdog driver and hardware.

    https://www.autosar.org/fileadmin/standards/R4.3.1/CP/AUTOSAR_SWS_WatchdogDriver.pdf

    We have removed  wdt_irq.c in MCAL v9.0.1 because to comply with above requirement as wdg internally does not support interrupt.

    Application has to call watchdog service routine  'Wdg_Trigger' provided in Wdg.c in the interrupt routine driven by a GPT timer.

    3. Regarding 'off_mode'

    Unfortunately Wdg cannot be set to OFF mode during runtime due to hardware limitation as mentioned in the 1st point above.

    BR,

    Sunil Kumar M S

  • Hi Sunil,

    As customer can not 'off' watchdog in sleep sequence and programming session, they faced device reset caused by WDT. Could you please provide guide how they can disable watchdog in sleep sequence and programming session?

    Thanks and Best Regards,

    SI.

  • Hi SI,

    May I know the reason why customer is trying to 'off' watchdog in programming session? Primary reason to use wdg is to monitor core and see if code is not stuck or it is not failed.

    BR,

    Sunil