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.

TMS320F2800157-Q1: How to use CMPSS DAC on a pin

Part Number: TMS320F2800157-Q1
Other Parts Discussed in Thread: SYSCONFIG, C2000WARE, LAUNCHXL-F2800157

Hello TI Team,
We're trying to use the CMPSS as a general purpose DAC to output a level on a pin. Using SysConfig 1.26.0 and C200Ware 6.0.1.00 we have this configuration:
image.png

image.png
image.png
image.pngBut there's 0V measured on the pad to the pin. Furthermore, updating the value of DACLow does not return the value set. Could you please advise us on possible next steps in order to establish the desired DAC functionality?

  • Hi Emil,

    Looks like this thread was incorrectly assigned so I appreciate your patience. 

    What device package are you currently using? Some of the F280015x packages don't support external analog reference so you will need to enable the internal voltage reference. Otherwise your configuration looks correct and should be able to output onto the DAC pin. The 4 requirements for enabling the DAC would be

    1. Configure Analog Reference

    2. Enable DAC OUTPUT in analog subsystem

    3. Enable CMPSS1 module

    4. Assign DAC value to DACLVALS

    You don't need to configure the CMPSS pinmux

    Regards,

    Peter

  • Hi Peter,

    We are using the F2800156-Q1, package 32RHB.

    Regarding your points:
    - Analog reference – In SysConfig (v1.26.0, C2000Ware 6.0.1.00), the Analog Reference option only exposes External for this package. There is no selectable Internal Reference option (as in the attached screenshot).
    - DAC output enable – CMPSS DACL Output Enable is enabled in the Analog Subsystem.
    - CMPSS module – CMPSS1 is enabled.
    - DAC value – DACLVALS is set in SysConfig to 500, and we also explicitly update it at runtime via CMPSS_setDACValueLow() to 1000. Despite this, the DAC pin remains at 0 V and reading back DACLVALS with CMPSS_getDACValueLow returns 500 (not 1000 set at runtime and read after 1500µs).

    Could you please confirm:
    - Whether 32RHB supports CMPSS DAC output at all, and
    - If an internal reference is mandatory for DAC operation on this package, how it should be enabled given SysConfig does not expose such an option?

  • Hi Emil, 

    - Whether 32RHB supports CMPSS DAC output at all, and

    The 32RHB should be supported since the only difference between the packages would be the number of pins and not the interconnect functionality

    - If an internal reference is mandatory for DAC operation on this package, how it should be enabled given SysConfig does not expose such an option?

    I seem to have mispoken, in fact only external reference is supported which is correct in the SysConfig. But there is no VREFHI pin instead that will be derived from the VDDA pin with no other option. I don't have access to a 32RHB but have tested the configuration on a LAUNCHXL-F2800157 and can see the DAC output changing. Can you try scoping the DAC pin with an oscilloscope or logic analyzer. When the device is not operating, there may be some noise on the pin since it is floating. And when you program and run the code, the voltage should stabilize since it is being driven by the CMP DAC, can you try verifying this on your side? 

    Regards,

    Peter