Part Number: TMS320F28069M
Other Parts Discussed in Thread: CONTROLSUITE
Tool/software: Code Composer Studio
Hi ,I am working on F28069M , I have to configure Comparator available on ADC module . I have configured as follows
SysCtrlRegs.PCLKCR3.bit.COMP1ENCLK = 1; // COMP1
GpioCtrlRegs.GPAMUX2.bit.GPIO20 = 3; // 0=GPIO, 1=EQEP1A, 2=MDXA, 3=COMP1OUT
GpioCtrlRegs.GPADIR.bit.GPIO20 = 1; // 1=OUTput, 0=INput
GpioCtrlRegs.AIOMUX1.bit.AIO2 = 2;
GpioCtrlRegs.GPAPUD.bit.GPIO20 = 1;
Comp1Regs.COMPCTL.bit.CMPINV = 0;
Comp1Regs.COMPCTL.bit.SYNCSEL = 0;
Comp1Regs.COMPCTL.bit.COMPDACEN = 1;
Comp1Regs.COMPCTL.bit.COMPSOURCE = 0;
Comp1Regs.DACVAL.all = 512;
so that I have analog input A2 which is now connected to comparator1 as first input and feeding second input of comparator from DAC(internal) with 512 value.
My question are : 1) is this configuration is correct ? is there any missing configuration register other than mentioned above.How to modify it ?
2) what is slew rate of internal op-amp comparator.