Hello Simon ,
in RGM_DES, you should have bit13 at 1 (F_SWT) when the watchdog occurred.
in RGM_FES, which bit is enabled in your case ?
There are many possible reasons generating a SWT event.
- not serving a key value in SWT_SR (lock case)
- not serving the good key value in SWT_SR
- serving the key value too late after Interrupt
- serving the key value too late or too early in WINDOW mode
- your timeout SWT_TO is too short to be able to serve it
- bad SWT registers access
- etc...
Carefully read the chapter 27.3 in reference manual RM0046
https://www.st.com/content/ccc/resource/technical/document/reference_manual/da/ea/65/05/30/83/46/e1/CD00259527.pdf/files/CD00259527.pdf/jcr:content/translations/en.CD00259527.pdf
You can look into SPC5Studio tool the demo "SPC560Pxx_RLA SWT Test Application for Discovery" showing how to program an interrupt use case.
Demo "SPC560Dxx_RLA SWT Test Application for Discovery" provides an example for the regular use case, with and without WINDOW mode.
Best regards.