Skip to content

Commit ec8c508

Browse files
srodrig1Anas Nashif
authored andcommitted
tests: watchdog: Interrupt reset mode modifications
In order for interrupt reset mode to work (reset the processor after and interrupt) the interrupt does not has to be cleared, and the qmsi hal layer clears the interrupt after the callback has been invoked, the callback does not return and the processor should reset. Jira: ZEP-1566 Change-Id: Ic951a0f15fe95fb0ef5d752b831c62e6fa3ceea0 Signed-off-by: Sergio Rodriguez <[email protected]> (cherry picked from commit b6cf56e)
1 parent 9b9f679 commit ec8c508

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/drivers/watchdog/wdt_basic_api/src/test_wdt_timeout.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ static void wdt_int_cb(struct device *wdt_dev)
4242

4343
TC_PRINT("%s: Invoked (%u)\n", __func__, ++wdt_int_cnt);
4444
QM_SCSS_GP->gps2++;
45+
46+
#ifdef INT_RESET
47+
/* Don't come out from the loopback to avoid have the interrupt
48+
* cleared and the system will reset in interrupt reset mode
49+
*/
50+
while (1)
51+
;
52+
#endif
4553
}
4654

4755
static int test_wdt(uint32_t timeout, enum wdt_mode r_mode)

0 commit comments

Comments
 (0)