winIDEA SDK
Loading...
Searching...
No Matches
mpc5xxx_tlb_read_write.py
# This script is licensed under BSD License, see file LICENSE.txt, or search for `License` in the SDK online help.
#
# (c) TASKING Germany GmbH, 2023
"""
This script demonstrates operations on MPC5xxxController
- reads a TLB entry
- writes a TLB entry
"""
import isystem.connect as ic
if __name__ == '__main__':
winidea_id = ''
cmgr = ic.ConnectionMgr()
cmgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
debugCtrl = ic.CDebugFacade(cmgr)
debugCtrl.download()
# get MPC5xxx controller
MPCCtrl = ic.CMPC5xxxController(cmgr)
# get TLB 7
TLB = MPCCtrl.getTLB(7)
# change RPN to 0x40800000 physical
TLB.m_dwMAS3 = 0x40800000 | (TLB.m_dwMAS3 & 0xFFF)
# set TLB 7
MPCCtrl.setTLB(7, TLB)