Отключение прерываний ядра перед запуском драйвера

This commit is contained in:
sh-sergey 2024-11-13 16:22:17 +03:00
parent eefc1f6325
commit 72179ae50c
2 changed files with 3 additions and 0 deletions

View File

@ -299,6 +299,7 @@ def write_memory(pages: Dict[int, List[int]], openocd: OpenOcdTclRpc, driver_pat
bytes_list = combine_pages(pages) bytes_list = combine_pages(pages)
openocd.halt() openocd.halt()
openocd.run("riscv.cpu set_reg {mstatus 0 mie 0}") # Отключение прерываний
STATUS_CODE_M = 0xFF STATUS_CODE_M = 0xFF

View File

@ -377,6 +377,8 @@ def write_pages_by_sectors(pages: Dict[int, List[int]],
result = 0 result = 0
openocd.halt() openocd.halt()
openocd.run("riscv.cpu set_reg {mstatus 0 mie 0}") # Отключение прерываний
init(openocd) init(openocd)
# openocd.run("rwp") # openocd.run("rwp")