Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

CC2640R2F: Sensor Controller : COMPA with DCOUPL as Reference triggers at 1.8V instead of 1.27V

$
0
0

Part Number: CC2640R2F

Hi Champions,

I made a very simple sw on SCE with the aim to use COMPA  to trigger a battery fault .

I'm testing the code through the SCS in task debugging on a LaunchXL-CC2640R2F .

To test, I'm appplying to DIO23  ( AUXIO_A_BATTERY_MONITOR ) a voltage from a Power Supply .

On DIO0 (AUXIO_O_DCDC_ENABLE) I'm monitoring the output of the comparator status .

I measured  DOUCPL on C19 and found it is 1.27V .

My tests shown that COMPA triggers for  Vinput > 1.8V while my expectacion was to trigger around 1.27V . 

What's wrong here ?

INITIALIZATION CODE :

// Select ADC input
adcSelectGpioInput(AUXIO_A_BATTERY_MONITOR);

// Enable COMPA
compaEnable();

// Select COMPA reference and input
compaSelectGpioRef(COMPA_REF_DCOUPL);
compaSelectGpioInput(AUXIO_A_BATTERY_MONITOR);

// Schedule the first execution
fwScheduleTask(1);

EXECUTION CODE  :

U16 loop4ever = 1;

while (loop4ever==1) {
    // Get COMPA Value
    compaGetOutput(output.compValue);
    if (output.compValue==1) {
        gpioSetOutput(AUXIO_O_DCDC_ENABLE);
    }else{
        gpioClearOutput(AUXIO_O_DCDC_ENABLE);
    }
    fwDelayUs(15, FW_DELAY_RANGE_100_US);
}

Thank you,

Paolo


Viewing all articles
Browse latest Browse all 262198

Trending Articles