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 direct access to ePWM registers allowed? (28075 vs. 28069)

Other Parts Discussed in Thread: CONTROLSUITE

Hi,

for debug purposes I try to access the ePWMx rgisters directly in the Code Composer Studio Registers window. This works fine with the 28069 (after the epwm peripheral clock is running). On the 28075, I can write only to some of the registers, e.g. TBPRD, TBCTR, but not to CMPA, AQCTL and others.

Has anyone an explanation for this? Is there an additional protection?

(HW are the 28069 and the 28075 control cards on a docking station, the 28075 with the 180 to 100 adapter. SW are the examples in the ControlSuite, e.g. Example_2806xEPwmUpDownAQ, for the 28075 .../epwm_updown_aq_cpu01.c)

Thanks

Frank

  • Frank,

    While the code is running, you will have to click on the value again after you’ve written to the register to see the new value. If that doesn’t show the new values, you will have to suspend the debug to see the updated values after you write to the registers. Let me know if you're still unable to write to these registers.

    Elizabeth
  • Elizabeth,

    thank you for the reply:

    Elizabeth Joy said:
    While the code is running, you will have to click on the value again after you’ve written to the register to see the new value. If that doesn’t show the new values, you will have to suspend the debug to see the updated values after you write to the registers. Let me know if you're still unable to write to these registers.

    This is exactly the behaviour I observe with the 28069 and e.g. when I write to TBPRD on the 28075. Writing to a variable that is forwarded to the CMPA register via a timer ISR code also works fine. Direct write to e.g. CMPA and other regs does not work on the 28075, but on the 28069.

    Finally, the values have to be written by the code, however, it would be comfortable to write registers directly with CCS to try something, instead of reprogramming, compiling, reload...

    Behavoir is the same both with TI XDS100v2 and SD XDS560v2LC, CCS version is 6.1.1.00022. Still wondering,


    Frank

  • Frank,

    Thanks for the update. Can you try restarting CCS, switching to a new workspace, and importing a different ePWM example found in F2807x device_support? Let me know if this issue still persists even with a fresh workspace and different project.

    Elizabeth
  • Elizabeth Joy said:
    Frank,

    Thanks for the update. Can you try restarting CCS, switching to a new workspace, and importing a different ePWM example found in F2807x device_support? Let me know if this issue still persists even with a fresh workspace and different project.

    Elizabeth

    Elizabeth,

    I did as you suggested. I created a new workspace and compiled and ran the projects

    C:\ti\controlSUITE\device_support\F2807x\v190\F2807x_examples_Cpu1\epwm_up_aq\cpu01\ccs\CPU1_RAM\epwm_up_aq_cpu01.out
    C:\ti\controlSUITE\device_support\f2806x\v151\F2806x_examples_ccsv5\epwm_up_aq\Debug\Example_2806xEPwmUpAQ.out

    Both compile and run well. On the 28069, I can change AQCTLB in CCS from 0x102 to 0x002 to switch EPWM1B off immediately (I see it on a scope), although the correct value is displayed in the register window with the next click only. No way to change AQCTLB on the 28075.

    Frank

  • Frank,

    Thanks for the update. I'll look into this behavior and let you know when I have more information. In the meantime, it would be good to use the workaround of setting the register in the code to debug.

    Elizabeth
  • Frank,

    Can you check if the latest TI C2000 Device Support tools are installed on your machine? You can check in CCS by navigating to:
    Help -> About Code Composer Studio
    Then, you can click on Installation Details and in the new window, you will find TI C2000 Device Support. The latest version is 4.1.7.0. You can update to this version by navigating to:
    Help -> Check for Updates

    Please let me know if upgrading to the latest tools doesn’t resolve your issue.

    Thanks,
    Elizabeth
  • Elizabeth,

    thank you for your reply and sorry for my delayed response due to my vacation from office for 3 weeks.

    I updated my C2000 device support from 4.1.6.0 to 4.1.7.0 but did not notice any change in the behaviour.

    As a workaround, I'll use CCS write to normal variables and program some additional code that copies the values to the registers. That's o.k. for some tests.

    Thanks

    Frank

  • Frank,

    I’ve found out this is an issue with older CCS versions, including CCS v6.1.1. I recommend updating to CCS v6.1.3 and seeing if the issue remains.
    If you choose not to update, these are some workarounds suggested by the CCS experts that you may find useful:

    “Writes from the Registers view are implemented as GEL expressions. So a write of "0" to "AdcaRegs.ADCCTL2" is implemented as an evaluation of "AdcaRegs.ADCCTL2 = 0". However, the loaded application has defined "AdcaRegs" has a struct (that overlays these peripheral registers). In that struct, "ADCCTL2" is a union, and not directly writable (you would have to write to "ADCCTL2.all" or an individual bit). As such, the write evaluation fails. This can be most easily seen by adding "AdcaRegs" or "AdcaRegs.ADCCTL2" to the expressions view and then noting the difference when loading/unloading symbols.

    Reads in the register view are not affected as they are implemented via a different mechanism.

    So you can work around this by:
    - adding the registers to the expressions view and modifying them there
    - unloading symbols
    - modifying the application to not define that struct (or to define it in a namespace or a slightly different name etc)”

    Hope this helps.

    Elizabeth
  • Elizabeth,


    thank you for the interesting background information that explains the different behaviour for the two MPUs with the different ePWM module versions.

    Your suggestion to write the registers via the expression view (not via the registers view) works fine, and it is much better than my idea to add extra program code.

    Occasionally I'll update my CCS and see if the write via the register view works too. Currently, there are some more interesting issues (you know).

    Thanks

    Frank