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.

LAUNCHXL-F280049C: LAUNCHXL-F280049C: Sensing Inductor Current -

Part Number: LAUNCHXL-F280049C
Other Parts Discussed in Thread: POWERSUITE

Tool/software:

Hi.

I am studying the code for the C2000 DPS BoosterPack - VMC Open Loop and I have two questions. 

  • Calculate the DACxVALA value-> You guys have ILOAD_NOM = 1.3 and the trip value is 5.2A. To calculate the value of the trip, you make this calculation:
    4096*Trip_Value/IL_MAX_SENSE. Shouldn't be 4095 instead of 4096? Because if I want to change the trip value to max_value (7.52A), then DACxVALA  would be 4096 and if I follow the equation from the User Guide, DACOUT = (4097/4096)*Vref. DACOUT would be slightly above VREF.

#define BUCK_IL_MAX_SENSE_A                ((float32_t) 7.52)
#define BUCK_ILOAD_NOM_A                   ((float32_t) 1.3)
#define BUCK_USER_DEFAULT_TRIP_A           ((float32_t)BUCK_ILOAD_NOM_A * 4)


BUCK_HAL_setOverCurrentTripLimit(BUCK_USER_DEFAULT_TRIP_A);


//
// BUCK_HAL_setOverCurrentTripLimit - Set the comparator digital trip limit to
// match the equivalent Amps value passed in through tripLimit_A. Returns the
// effective digital trip limit.
//
uint16_t BUCK_HAL_setOverCurrentTripLimit(float32_t tripLimit_A)
{
    uint16_t dacVal;

    //
    // Range check and correct desired limit; then convert to digital value
    //
    if(tripLimit_A >= BUCK_IL_MAX_SENSE_A)
    {
        dacVal = BUCK_CMPSSDAC_CODES - 1;
    }
    else if(tripLimit_A < (float32_t)0)
    {
        dacVal = 0;
    }
    else
    {
        dacVal = (uint16_t)(BUCK_CMPSSDAC_CODES *
                            tripLimit_A /
                            BUCK_IL_MAX_SENSE_A);
    }
    
    //
    // Set comparator trip value
    //The code enters into ELIF, not the IF
    #if(BUCK_OC_CMPSS_CMP_HL == BUCK_CMPSS_COMP_HI)
        CMPSS_setDACValueHigh(BUCK_OC_CMPSS_BASE, dacVal);
    #elif(BUCK_OC_CMPSS_CMP_HL == BUCK_CMPSS_COMP_LO)
        CMPSS_setDACValueLow(BUCK_OC_CMPSS_BASE, dacVal);
    #endif

    //
    // Return effective trip value
    //The code enters into ELIF, not the IF
    #if(BUCK_OC_CMPSS_CMP_HL == BUCK_CMPSS_COMP_HI)
        return( CMPSS_getDACValueHigh(BUCK_OC_CMPSS_BASE) );
    #elif(BUCK_OC_CMPSS_CMP_HL == BUCK_CMPSS_COMP_LO)
        return( CMPSS_getDACValueLow(BUCK_OC_CMPSS_BASE) );
    #endif
}

static inline void
CMPSS_setDACValueLow(uint32_t base, uint16_t value)
{
    //
    // Check the arguments.
    //
    ASSERT(CMPSS_isBaseValid(base));
    ASSERT(value < 4096U);

    //
    // Write the DAC value to the DAC value shadow register.
    //
    HWREGH(base + CMPSS_O_DACLVALS) = value;
}

  • My second question: This is more hardware question. Do you guys have a white paper or a document to study how the sensing inductor current through a shunt resistor works? I want to learn how to select the resistor and capacitor value, if I want to design something in the future or what value would be my output depending on the current


    EDIT: I noticed this is a differential amplifier

In this document shows me how to calculate C13 and C14 (https://fscdn.rohm.com/en/products/databook/applinote/common/low_side_current_sense_circuit_design_an-e.pdf), but it doesn't show to calculate C10, C11 and C12

  • Hi,

    We will need a day or two to get back to you.

    Best Regards,

    Ben Collier

  • Hi Andres,

    Thanks for reaching out

    Calculate the DACxVALA value-> You guys have ILOAD_NOM = 1.3 and the trip value is 5.2A. To calculate the value of the trip, you make this calculation:
    4096*Trip_Value/IL_MAX_SENSE. Shouldn't be 4095 instead of 4096? Because if I want to change the trip value to max_value (7.52A), then DACxVALA  would be 4096 and if I follow the equation from the User Guide, DACOUT = (4097/4096)*Vref. DACOUT would be slightly above VREF.

    In this instance, you should use 4095 to be correct. But it seems a different equation is provided than the one in the official TRM which you can see below

    My second question: This is more hardware question. Do you guys have a white paper or a document to study how the sensing inductor current through a shunt resistor works? I want to learn how to select the resistor and capacitor value, if I want to design something in the future or what value would be my output depending on the current

    We have some calculations present in the powerSUITE version of the project. It helps to provide key values based on the user's custom component selections. You can refer to this for testing different component values in your system

    Regards,

    Peter