🎉 We're happy to announce new public releases! ðŸŽ‰

  • SWAT v1.1r1 - Software tracing solution now supporting more architectures and operating systems - see SWAT Release Notes.
  • TriCore v6.2r2 Inspector v1.0r8 - An automated method for identifying toolset issues in compiled output code.
  • VX-toolset for Arm - v8.0r1 - A certified compiler toolset for safety-critical embedded software development on Arm cores.
Contact us to get access!

writeRegister() call not working

23-Sep-2024

When trying to write a value into a specific Special Function Register (SFR register) using the writeRegister() SDK function an error occurs,  stating that the specified register doesn't exist.


Possible solution

Method CDataController::writeRegister() can write to Core Registers only. For SFRs method CDataController::modify() should be used.

Example:

dataCtrl.modify(ic.IConnectDebug.fMonitor, '@TIM1\\CCR1', '12')


To get the full name of the SFR, which is required by the method:

  1. Drag and drop the SFR from the SFR Window into the Watch Window to get the exact strings needed for the script. 

  2. Copy the string from the Watch Window into your script:

  • Right-click on the row and select Copy Name or
  • Press keys CTRL + C.


        

    More resources



      Was this answer helpful?