上传watchdog的测试用例

This commit is contained in:
2025-09-29 11:11:15 +08:00
parent 701f5c8432
commit 879407934c
2 changed files with 6 additions and 5 deletions

View File

@@ -146,7 +146,7 @@ if __name__ == '__main__':
#'''
add_tc_2_runlist(watchdog.tc1())
#add_tc_2_runlist(watchdog.tc2())
add_tc_2_runlist(watchdog.tc2())
#add_tc_2_runlist(mac.tc1())
#add_tc_2_runlist(mac.tc2())

View File

@@ -53,7 +53,7 @@ def watchdog_test_sm_wr_timeout(tc_id, wd_id):
genPkt.addBeforeExc(genTcStartFrameCode(gen_file_def, tc_des)
+ genIFRwDataCode(1, 0x404, True, 4, data0)
+ genIFRwDataCode(1, 0x40C, True, 4, data1)
+ genIFRwDataCode(1, 0x40C + (wd_id - 1) * 4, True, 4, data1)
+ genIFRwDataCode(1, 0x078, True, 4, data2)
+ genIFRwDataCode(2, 0x078, True, 4, data2)
+ genIFRwDataCode(3, 0x078, True, 4, data2)
@@ -130,7 +130,8 @@ def watchdog_test_sm_rd_timeout(tc_id, wd_id):
genPkt.addBeforeExc(genTcStartFrameCode(gen_file_def, tc_des)
+ genIFRwDataCode(1, 0x404, True, 4, data0)
+ genIFRwDataCode(1, 0x40C, True, 4, data1)
+ genIFRwDataCode(1, 0x40C + (wd_id - 1) * 4, True, 4, data1)
+ genIFRwDataCode(0, 0x078, True, 4, [0xff, 0xff, 0xff, 0xff])
+ genIFRwDataCode(1, 0x078, True, 4, [0xff, 0xff, 0xff, 0xff])
+ genIFRwDataCode(2, 0x078, True, 4, [0xff, 0xff, 0xff, 0xff])
+ genIFRwDataCode(3, 0x078, True, 4, [0xff, 0xff, 0xff, 0xff])
@@ -172,14 +173,14 @@ def watchdog_test_sm_rd_timeout(tc_id, wd_id):
+genIFRwDataCode(1, 0x800 + slave_sm_id * 0x1000, False, 8)
+genMessageCode("--延时后检查看门狗寄存器")
+"#1000000\n"
+"#700000\n"
+genIFRwDataCode(1, 0x400, False, 0x04)
+genIFRwDataCode(1, 0x400, True, 4, [0xff, 0xff, 0xff, 0xff])
+genIFRwDataCode(1, 0x400, False, 0x04)
+genMessageCode("--复位数据缓冲区")
+genIFRwDataCode(1, 0x300 + slave_sm_id * 4, True, 1, [0, ])
+genMessageCode("--延时后检查看门狗寄存器")
+"#500000\n"
+"#1200000\n"
+genIFRwDataCode(1, 0x400, False, 0x04)
+genTcEndFrameCode(gen_file_def))