Python modify() call not working with raw address (cache RAM)

26-Nov-2024

To be able to write to the SFR register you need to use the modify() call.


Possible solutions

Drag and drop an item to the Watch Window

This way you will get the correct syntax and to find out the name of the SFR.



Use this syntax in Python
  • Backslash ''\'' in Python is also used as an instruction (\n \r etc.), use ''\\''.
  • The Symbol has to be a string. Use to capture. For example ‘Today “is a great” day’.


Use the modify() function to write to SFR register

writeRegister() is used to write to the Core Register.

  •  symbol = '@"Floating-point registers"\\"Doubleword registers"\\D0'
  • debugCtrl.modify(ic.IConnectDebug.fSFR, symbol, reg_value)

The modify()call works the same as the Watch Window.  If you can access it in the Watch Window you can use the modify()call.

Was this answer helpful?