Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE
Hello all,
I'm using F28388D for my product development.
As I'm facing issues related to unexpected LWIP hang I want to use watchdog in CM to reset all 3 cores.
So I learnt that on CM watchdog expiry, it will either Reset(XRST) or will generate an NMI interrupt in CM core and If we dont serve that NMI interrupt CM core will get reset which inturn will also generate an NMI interrupt in CPU1.
Till here I'm able to implement and test as expected, I'm able to configure WD on CM and generate an NMI on CPU1 and reset CPU1 in NMI callback which will inturn resets all cores.
But the problem is : I'm unable to control watchdog reset time period.
I want Reset to happen only if execution is stuck in certain function for sometime, ideally it will excute that function for ~10mS (for instance) but in error case In my debug I found that LWIP is stuck in certain function infinitely. So If I can Enable watchdog's counter with some measured time (lets say ~1sec) at the start of certain function and at the end of that function again I want to disable watchdog timer, This repeats endlessly.
To perform this I want to configure watchdog for certain timing/count which I'm facing issues and unable to validate.
I've gone through "watchdog_ex1_nmi_handling" example code and using configuring WD in CM as below:
I'm calling this function from main() after CM_init();

I have kept breakpoint after executing above (screenshot ) watchDogConfig function,
This is my register window status:
WD registers:

NMI registers:

I tried using "SysCtl_serviceWatchdog" in main while(1) loop with above configurations, It still generates NMI Interrupt. Is this expected ? Am I missing something here ?
I tried setting SysCtl_setWatchdogWindowValue(0) and SysCtl_setNMIWatchdogPeriod(0xFFFF), this also generates NMI immediately.
From TRM we can infer that, WDCHK shall be set to 101 inorder to access WDCR register, but here I see that even after enabling watchdog ie., WDDIS is 0, WDCHK is still 0 which is not expected. correct ?
But in code I see that 101 is being written to WDCHK but it seems like it isn't taking effect. Can somebody confirm.

I also tried same excercise using F28388 DVK kit and example code, it see same behavior there aswell. No matter what Configuration I make I see NMI interrupt is being generated immediately. Also In Register window I tried to change WDCHK value manually but it isn't taking efffect.
Vivek Singh / @ Hareesh Janakiraman Can you please help me out here.
Thanks and regards,
Pranay.

