MSPM0L2227: External vref design

Part Number: MSPM0L2227
Other Parts Discussed in Thread: SYSCONFIG, LP-MSPM0L2228, TL431

I want to use external vref for measurement. I've configured adc and vref using sysconfig. But adc showing 0V , when I change it to vdda it works fine. I tried example code as well but not working. Can someone tell me did I miss something in circuit.

  • Is your Vref present on the VRef + pin?

    Can you show a screenshot of your VRef config?

    Here is what I have for the MSPM33C321:

  • Yes my vref is present of vref pin. My controller is also have same configuration. It's vref pin is PA23

  • Hi Pritam,

    Are you using LP-MSPM0L2228 or your customized board?

    How does you connect the external REF to VREF+?

    B.R.

    Sal

  • Hi Sal Ye,
    I tried in both dev board and my custom board. It's working in dev board but not in my project. I've used TL431 to generate 3V3 referance supply from 5V.

  • Hi Pritam,

    Have you connected the ground pin of TL431 to VREF- pin?

    The external reference need enable both VREF+ and VREF- for ADC conversion.

    I see in SysConfig you disabled VREF- pin.

    B.R.

    Sal

  • Hi Sal Ye,

    Yes Vref - is disable. In sys config I've read that when Vref- is disabled it goes to Vss. I'll try as per your thought and let you know.

  • Hi Pritam,

    Please make sure in your hardware board, the ground of TL431 is connected to VREF- pin.

    B.R.

    Sal

  • Hi Sal Ye,

    When I enabled Vref+ and Vref- sysconfig genrated code is below 

    /* Defines for VREF */
    #define VREF_VOLTAGE_MV                                                     3000
    #define GPIO_VREF_VREFPOS_PORT                                             GPIOA
    #define GPIO_VREF_VREFPOS_PIN                                     DL_GPIO_PIN_23
    #define GPIO_VREF_IOMUX_VREFPOS                                  (IOMUX_PINCM67)
    #define GPIO_VREF_IOMUX_VREFPOS_FUNC                IOMUX_PINCM67_PF_UNCONNECTED
    #define GPIO_VREF_VREFNEG_PORT                                             GPIOA
    #define GPIO_VREF_VREFNEG_PIN                                     DL_GPIO_PIN_21
    #define GPIO_VREF_IOMUX_VREFNEG                                  (IOMUX_PINCM56)
    #define GPIO_VREF_IOMUX_VREFNEG_FUNC                IOMUX_PINCM56_PF_UNCONNECTED
    #define VREF_READY_DELAY    
    static const DL_VREF_Config gVREFConfig = {
        .vrefEnable     = DL_VREF_ENABLE_DISABLE,
        .bufConfig      = DL_VREF_BUFCONFIG_OUTPUT_2_5V,
        .shModeEnable   = DL_VREF_SHMODE_DISABLE,
        .holdCycleCount = DL_VREF_HOLD_MIN,
        .shCycleCount   = DL_VREF_SH_MIN,
    };

    SYSCONFIG_WEAK void SYSCFG_DL_VREF_init(void) {
        DL_VREF_configReference(VREF,
            (DL_VREF_Config *) &gVREFConfig);
        delay_cycles(VREF_READY_DELAY);
    }
    It's just defined Vrefneg pin but not used anywhere, is this correct ?
  • Hi Pritam,

    I checked the analog feature and yes this is expected.

    The analog feature is default connected, when users enable the external VREF, it will not configure any pin.

    While when ADC start ADC conversion with VREF module, it will connect VR+ to VREF+, and VR- to VREF-.

    Thus, users just need take care that VREF- has correctly connected to the ground of external reference input.

    B.R.

    Sal

**Attention** This is a public forum