解决了base.tc27的中断清除问题

This commit is contained in:
2025-09-03 19:08:29 +08:00
parent 4b0e81f8f2
commit 34b7576f15
5 changed files with 21 additions and 9 deletions

View File

@@ -1884,12 +1884,17 @@ def tc27():
sm_idx = 0
genPkt.addBeforeExc(genTcStartFrameCode(gen_file_def, tc_des))
genPkt.addBeforeExc(genTcStartFrameCode(gen_file_def, tc_des)
+genMessageCode("--清除中断")
+genIFRwDataCode(0, 0x78, True, 4, [0xff, 0xff, 0xff, 0xff])
)
genPkt.addAfterExc(genWriteTransLenCode(gen_file_def, sm_idx)
+genWriteTransPktCode(gen_file_def, sm_idx)
+genTrgTransPktCode(gen_file_def, sm_idx)
+genReadAckPktCode(gen_file_def, sm_idx)
+genMessageCode("--清除中断")
+genIFRwDataCode(0, 0x78, True, 4, [0xff, 0xff, 0xff, 0xff])
)

View File

@@ -1375,6 +1375,8 @@ def tc7():
+ '''txBuf[8] = 8'h00;\n'''
+ '''txBuf[9] = 8'h0a;\n'''
+ '''txBuf[10] = 8'h00;\n'''
+ '''txBuf[11] = 8'h01;\n'''
+ '''txBuf[12] = 8'h00;\n'''
+ '''txBuf[19] = (_temp_time & 8'hff);\n'''
+ '''txBuf[20] = ( (_temp_time >> 8) & 8'hff);\n'''
+ '''txBuf[21] = ((_temp_time >> 16) & 8'hff);\n'''
@@ -1396,6 +1398,10 @@ def tc7():
+ '''txBuf[37] = 8'h00;\n'''
+ '''txBuf[38] = 8'h00;\n'''
+ '''txBuf[39] = 8'h00;\n'''
+ '''txBuf[40] = 8'h00;\n'''
+ '''txBuf[41] = 8'h00;\n'''
+ '''txBuf[42] = 8'h00;\n'''
+ '''txBuf[43] = 8'h00;\n'''
+ '''spi_trans( (16'h0120), (`SPI_WRITE), (40), (`IF_IDX(0)));\n'''
)