This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/CCSTUDIO: Accessing Decoded Register Data through DSS or Scripting Console

Part Number: CCSTUDIO
Other Parts Discussed in Thread: AM5718

Tool/software: Code Composer Studio

Let's take the device as the AM5718 for sake of example.  I'd like to write a script that outputs a file (e.g. csv file) containing all of the pin muxing selections for a given device.  I see that CCS has the ability to decode all these registers.  For example, let's look at CTRL_CORE_PAD_GPMC_AD0 at address 0x4A003400.  Is there any way for me to be able to get access to the decoded register data via DSS?

  • Hi Brad,
    Are you looking to do something like:

    ds.memory.readRegister("CTRL_MODULE_CORE_CTRL_CORE_PAD_GPMC_AD0_GPMC_AD0_WAKEUPEVENT");

    so you can get the value of GPMC_AD0_WAKEUPEVENT directly instead of the whole value of CTRL_CORE_PAD_GPMC_AD0?

    Thanks
    ki
  • No, the least significant 4 bits of each CONTROL_CORE_PAD_* register contains the mux mode. So for example if the value of CTRL_CORE_PAD_GPMC_AD0 contains a value of 3 for the least significant nibble, I'm looking for a way to see that means "VOUT3_D0". Speaking at a high level CCS knows how to decode this register, as all the data is part of the xml files in C:\ti\ccsv7\ccs_base\common\targetdb\Modules\am571x .
  • Sorry, I wasn't clear. My example was more general example of accessing a defined field in the register (I used GPMC_AD0_WAKEUPEVENT arbitrarily). 

    I see you want to access GPMC_AD0_MUXMODE specifically. So you would want to be able to do something like:

    var val = ds.memory.readRegister("CTRL_MODULE_CORE_CTRL_CORE_PAD_GPMC_AD0_GPMC_AD0_MUXMODE");

    where val would be the value GPMC_AD0_MUXMODE

    I don't think you can drill down to this level with the readRegister command. I'll confirm this

    ki

  • Is the return value going to be the numeric value or the text description? It's the decoded value (i.e. the description of what that value means) that I'm interested in. So looking at that least significant nibble, I'm looking to decode it:

    0 -> GPMC_AD0
    2 -> VIN1A_D0
    3 -> VOUT3_D0
    14 -> GPIO1_6
    15 -> SYSBOOT0
  • I tried this out and it is only possible to get the numeric (non-decoded) value of that defined field. And this is only via GEL. It is not possible to do this via native DSS API. But since DSS can call GEL expressions, you can do something like:

    var val = ds.expression.evaluate("CTRL_MODULE_CORE.CTRL_CORE_PAD_GPMC_AD0.GPMC_AD0_MUXMODE");

    and 'val' would have the numeric value.

    ki
  • That's not the answer I was hoping for, but an answer nonetheless. Thanks. I'll probably explore writing a script to parse the CCS xml files and output into a format I can use directly.