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.

CompX 28069

Hello.

I'm using comparators in 28069.

I have the code:

 

EALLOW;

Comp1Regs.COMPCTL.bit.COMPDACEN = 1;

asm(" NOP");asm(" NOP");asm(" NOP");asm(" NOP"); // wait some clock cycles

Comp1Regs.COMPCTL.bit.CMPINV = 0;

Comp1Regs.COMPCTL.bit.COMPSOURCE = 0;

Comp1Regs.COMPCTL.bit.SYNCSEL = 0;

 

EDIS;

but when I read Comp1Regs.COMPCTL.bit every bit is zero.

 

Can someone help me ?