IWDT S7G2 + iar + SSP1.5.2

Hello,

I need your help.

I used thread monitor with WDT : working fine.

Now i wanted to move to IWDT : BIG ISSUE there is no reset, it seems that the timer doesn't work.

 

--------------------------------------------------------------------------------------

With WDT 

R_DBG->DBGSTOPCR_b.DSWDT = 0;
g_wdt0.p_api->open(g_wdt0.p_ctrl,g_wdt0.p_cfg);
while(1);

The mcu reset -> working

--------------------------------------------------------------------------------------

With IWDT 

R_DBG->DBGSTOPCR_b.DSIWDT = 0;
g_wdt1.p_api->open(g_wdt1.p_ctrl,g_wdt1.p_cfg);
while(1);

The mcu DOES NOT reset-> PLEASE HELP

--------------------------------------------------------------------------------------

I tried for a day without success

 

Thanks for your help

  • In reply to Ajith:

    You are both having issues with your custom boards, however, I see no problem using the iWDT on Renesas Synergy boards. I am wondering if there are any pins or power supplies connected incorrectly on your custom boards.
  • In reply to Jeremy:

    Hi Jeremy,

    Is there any pin or power supplies connected to the IWDT that may generate this kind of problem in that case ?

    thanks in advance,

    Clément.
  • In reply to Clément:

    Clement,

    There are no pins specific to the iWDT, but I think it would be good to double check the hardware design to rule out any issues first.

    Jeremy
  • In reply to Jeremy:

    Jeremy,

    Our custom board is working fine in every aspect but the IWDT. Even the WDT component is okay so I hardly believe in the hardware cause... Other than hardware, on my side I only tried your code on my working project. So i didn't try with just a watchdog running on my custom board. If this work, maybe there is some problem between the IWDT and another module...
  • In reply to Ajith:

    The things I would check are :-

    1) What is written into the flash for the OFS registers (0x0000 0400 and 0x0000 0404)?

    2) Is the ILOCO clock actually running? I would use the CAC to do this.

    3) Does the counter value in the iWDT IWDTSR register (address 0x4004 4404) change?
  • In reply to Jeremy:

    Also, are you using a bootloader?
  • In reply to Jeremy:

    I have a custom bootloader to launch the app whicj handle the watchdog
  • In reply to Ajith:

    In that case the bootloader would have to start the iWDT as it is programmed into the flash area that starts the iWDT. The application cannot start the iWDT as it is at a higher address.

    The OFS registers are in Flash at addresses 0x0000 0400 and 0x0000 0404, these are in the first 8KB block of flash (where the bootloader is programmed), on an S5 or S7 device.
  • In reply to Jeremy:

    Ok this is an explanation for me
  • In reply to Ajith:

    OK, If we have to start the watchdog from the bootloader part, does that mean we can't refresh it on our application ?

    Oups, nevermind ! I suppose you mean I have to change the BSP settings for IWDT in the bootloader software ?

    I can juste use the IWDT module on my main application after that ?

  • In reply to Clément:

    Yes, the bootloader would have to start the iWDT, as the OFS registers sit in the flash block that the bootloader uses. The iWDT is then running and needs to be re-freshed by whichever software is running, either the bootloader or the main application.
  • In reply to Jeremy:

    Thanks, I'll try ASAP !

     

    Edit : That was the problem, it works like a charm now !

    Thank you :)