Categories

{{ selectedCategory.name }}

{{ topic.Title }} {{ topic.Ddate | formatDate }}

{{ topic.Content }}

No topics found!

winIDEA SDK: writeRegister() call not working

19-Feb-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?

      Sorry this article didn't answer your question, we'd love to hear how we can improve it.
      Note: This form won't submit a case. We'll just use it to make this article better.

      Similar topics

      {{ topic.Title }} {{ topic.Ddate | formatDate }}

      {{ topic.Content }}

      No similar topics found!

      Other topics in the same category

      {{ topic.Title }} {{ topic.Ddate | formatDate }}

      {{ topic.Content }}

      No topics found!