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.

CC2340R5-Q1: How to clear wdt after jump from SBL to APP?

Part Number: CC2340R5-Q1
Other Parts Discussed in Thread: CC2340R5,

Tool/software:

Hi team,

If enable watchdog in 2nd bootloader, as the CC2340 watchdog cannot be closed. 

Questions: how to feed the watchdog in APP as the APP didnot have the watchdog handle ?

Can you please provide a register level watchdog clear code? 

Thanks.

Regards,

Wesley

  • Hello Wesley,

    We have an example project for the watchdog in <SDK Install Dir>\examples\rtos\LP_EM_CC2340R5\drivers\watchdog

    This project shows how to initialize and create the watchdog handle. To make it accessible via the app, you can make the handle global.

    Additionally, for further details please refer to Section 6.7.1 Watchdog Timer (WDT) in the CC2340R5-Q1 TRM, Section 6.9.52 for information in unlocking the watchdog registers to be written to, and Section 6.9 (CKMD Registers) for available watchdog registers:

    Best,

    Nima Behmanesh

  • Hi Nima,

    Yeah, I know the code path. My questions is can this function Watchdog_clear(watchdogHandle); works without input the handle? like Watchdog_clear(0); 

    If not, how to make the app code access this handle as the WDT open is called in SBL?

    Thanks.

    Regards,

    Wesley

  • Hi Wesley,

    How are they opening the WDT inside the SBL? Is this a custom SBL?

    Best,

    Nima Behmanesh

  • Hi Nima,

    Yes, SBL is secondary bootloader which is custom SBL. Not talking the Rom bootloader.

    Thanks,

    Wesley

  • Hi Wesley,

    I see, so in this case, I think the best path forward would be storing the handle somewhere in flash where the application can retrieve it. 

    I can ask my colleagues and see if we've seen something like this before and how it was handled.

    Best,

    Nima Behmanesh

  • Hi Nima,

    Can we easily provide a reference code with several register address write through a pointer to feed the dog? This is the quickest path.

    Thanks.

    Regards,

    Wesley

  • Hi Wesley, 

    Just to make sure I understand the ask:

    To provide reference code to send data via register write from a customer bootloader?

    We don't have anyway of creating our own custom bootloader, but if it's just code that writes to a certain address I believe we can do that.

    Best,

    Nima Behmanesh