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.

  • TI Thinks Resolved

TMS320F280049: COMPHSTS and COMPHLATCH value when CMPSS disable

Intellectual 950 points

Replies: 1

Views: 55

Part Number: TMS320F280049

Hi Team,

when configure Cmpss3Regs.COMPCTL.bit.COMPDACE = 0 to disable Cmpss3,  and Cmpss3Regs.COMPCTL.bit.COMPHINV = 1,  COMPHSTS and COMPHLATCH value is 1 as below showed. it seems the block diagram did not show the relationship between COMPDACE and COMPHSTS/COMPHLATCH value, what is the relationship between COMPDACE and COMPHSTS/COMPHLATCH?

I also post the configuration code of CMPSS3 as below:

EALLOW;
/* CMP SEL */
AnalogSubsysRegs.CMPHPMXSEL.bit.CMP3HPMXSEL = 3;
/* Disable CMPSS1 */
Cmpss3Regs.COMPCTL.bit.COMPDACE = 0;
/* NEG signal comes from DAC */
Cmpss3Regs.COMPCTL.bit.COMPHSOURCE = NEGIN_DAC;
/* Use VDDA as the reference for DAC */
Cmpss3Regs.COMPDACCTL.bit.SELREF = REFERENCE_VDDA;
/* Set DAC to midpoint for arbitrary reference */
Cmpss3Regs.DACHVALS.bit.DACVAL = 2283;//160v

/* Maximum CLKPRESCALE value provides the most time between samples */
Cmpss3Regs.CTRIPHFILCLKCTL.bit.CLKPRESCALE = 0x5;
/* Set SAMPWIN and THRESH */
Cmpss3Regs.CTRIPHFILCTL.bit.SAMPWIN = 5;
Cmpss3Regs.CTRIPHFILCTL.bit.THRESH = 5;
/* Reset filter logic & start filtering */
Cmpss3Regs.CTRIPHFILCTL.bit.FILINIT = 1;
/* Configure CTRIPOUT path */
Cmpss3Regs.COMPCTL.bit.CTRIPHSEL = CTRIP_LATCH;
Cmpss3Regs.COMPCTL.bit.CTRIPOUTHSEL = CTRIP_LATCH;

Cmpss3Regs.COMPCTL.bit.COMPHINV = 1;

/* Enable CMPSS1 */
Cmpss3Regs.COMPCTL.bit.COMPDACE = 0; // 1
EDIS;

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.