Hey,
I am currently working on the RTI Digital Watchdog of the TMS570 and I am struggling to find the right information on my problem.
I want to be able to read out the last return address, before the DWD reset had been triggered so that I can see, where the code went "wild". To do so, I am currently setting the DWD up, so that it triggers an Interrupt instead of a direct reset. From the esmGroup2Notification Interrupt routine I than write the r14 Register Value to the eeprom so that I can access it, after the system is reset and memory gets reinitialized. After storing the address to eeprom I trigger a reset by writing to the SYSECR register. Furthermore I edited the HL_system.getResetSource function to also check the Watchdog Status Register so that it can determine, that the reset has actually been caused by a watchdog violation. After the reset is done and the system is reinitialized I simply read the address from the eeprom.
So far this seems to be working fine and it feels like a good workaround but my three questions would be:
Q1: Is there any other way that would be recommended, to get the latest return address before a dwd reset has been triggered?
Q2: To my understanding the NMI caused by the dwd violation is an FIQ which already has high priority. Does that mean it will interrupt all IRQs that might be running while the violation occurred?
Q3: What about possible FIQs that might have been running at the time of the violation?
Q2 and Q3 are more or less connected since I want to make sure, that the dwd violation is of highest priority and will most definitely be handled to than cause the reset inside of the esmGroup2Notification Handler. My concern is, that another Interrupt could run "wild" and cause the system to hang itself up, which should be noticed and handled by the dwd. So far I could not fully get the answers to this from the manuals.
Cheers, Alex