TPS6594-Q1: MCU ESM RESET issue.

Part Number: TPS6594-Q1

Tool/software:

Hello Team,

I am using TPS6594 PMIC in our custom board.

I am trying to test the MCU ESM reset behavior by asserting the following pin which is connected toTPS6594(gpio7).

I ensured following configurations are proper.

1. Clear the Interrupts which are triggered after the device(TPS6594) is powerd up.
2. Enabling the ESM_MCU_EN bit.
3. watch dog is disabled.

4. Enabling the ESM_MCU_START bit.

with above configuration when i assert the MCU_SAFETY_ERRZ_PMIC pin, PMIC is not resetting instead, PMIC is going to hang state.

can you please guide if i am missing anything else here?

regards,

Prasad.

  • Hello Prasad,

    If you have a part number (PN) associated with your question, then look up the documentation related to that PN.

    As the ESM behavior is defined by the PN NVM (Non Volatile Memory). If you are using your own NVM then you need to tie the ESM_ERROR trigger with the restart sequence (you need to create one if you hadn't already).

    If you are using the Level mode, the assertion of the pin will keep the device up as it will only detect a low level after the deglitch filter passes.

    Make sure the ESM_XXX_XXX_MASK are not applied, see below

    BR,

    Nicholas McNamara

  • Hello Nicholas McNamara,

    Make sure the ESM_XXX_XXX_MASK are not applied, see below
    I have no configs related to ESM MASK registers.
    I read the register 0x59 register and the value is 0x7 (MASK_ESM Register (Offset = 59h) [Reset = 00h]).

    I am using pdk_j784s4_10_01_00_25.
    pdk_j784s4_10_01_00_25/packages/ti/drv/pmic/test/esm_test/, there are some test cases for esm mcu and soc present in this path, can you please suggest  one API which i can use for above test scenario?

    Regards,

    Prasad.

  • Hello Prasad,

    Could you give me your Part Number on the board or give me the first three register values? Without it I can not help as the firmware is very specific on the device which has each PMIC behaving very differently.

    Could you provide your source code, so that the software team and I can take a look? Please do get me the answer to the question above thank you

    BR,

    Nicholas McNamara

  • Hello Nicholas McNamara

    I have following part number on the board.
    TPS6594133ARWERQ1

    Here is the data from first three registers.
    DEV_REV Register = 0x82
    NVM_CODE_1 Register = 0x3a

    NVM_CODE_2 Register  = 0x5

    I have following function implemented for the MCU ESM.

    /*!
    * \brief MCU ESM configuration in level mode with delay1 and delay2,
    * Enabled ESM_MCU_EN.
    */
    void Tps6594Pmic_Esm_setConfiguration_esmMcuLevelMode(void)
    {
    int32_t pmicStatus = PMIC_ST_SUCCESS;
    bool esmType = PMIC_ESM_MODE_MCU;
    bool esmToggle = PMIC_ESM_ENABLE;
    bool esmState = false;
    uint8_t pin = 7U;
    Pmic_IrqStatus_t errStat = {0U};
    Pmic_EsmCfg_t esmCfg_rd = {PMIC_ESM_CFG_DELAY1_VALID_SHIFT |
    PMIC_ESM_CFG_DELAY2_VALID_SHIFT |
    PMIC_ESM_CFG_MODE_VALID_SHIFT |
    PMIC_ESM_CFG_EN_DRV_VALID_SHIFT,};
    Pmic_EsmCfg_t esmCfg =
    {
    PMIC_ESM_CFG_DELAY1_VALID_SHIFT | PMIC_ESM_CFG_DELAY2_VALID_SHIFT | PMIC_ESM_CFG_MODE_VALID_SHIFT | PMIC_ESM_CFG_EN_DRV_VALID_SHIFT,
    ESM_MCU_DELAY1,
    ESM_MCU_DELAY2,
    PMIC_ESM_ERR_EN_DRV_CLEAR_ENABLE,
    PMIC_ESM_LEVEL_MODE
    };

    Pmic_GpioCfg_t gpioCfg =
    {
    PMIC_GPIO_CFG_PINFUNC_VALID_SHIFT,
    PMIC_GPIO_OUTPUT,
    PMIC_GPIO_OPEN_DRAIN_OUTPUT,
    PMIC_GPIO_PULL_DOWN,
    PMIC_GPIO_DEGLITCH_ENABLE,
    PMIC_TPS6594X_GPIO_PINFUNC_GPIO7_NERR_MCU,
    PMIC_GPIO_HIGH
    };

    pmicStatus = Pmic_gpioSetConfiguration(pPmicCoreHandleI2C, pin, gpioCfg);
    if(pmicStatus != PMIC_ST_SUCCESS)
    {
    Tp6594Pmic_log("Failed %s():%d\n", __func__,__LINE__);
    }

    pmicStatus = Pmic_esmStart(pPmicCoreHandleI2C, esmType, PMIC_ESM_STOP);
    if(pmicStatus != PMIC_ST_SUCCESS)
    {
    Tp6594Pmic_log("Failed %s():%d\n", __func__,__LINE__);
    }

    esmCfg.validParams = PMIC_ESM_CFG_EN_DRV_VALID;
    pmicStatus = Pmic_esmSetConfiguration(pPmicCoreHandleI2C, esmType, esmCfg);
    if(pmicStatus != PMIC_ST_SUCCESS)
    {
    Tp6594Pmic_log("Failed %s():%d\n", __func__,__LINE__);
    }

    pmicStatus = Pmic_esmGetConfiguration(pPmicCoreHandleI2C,
    esmType,
    &esmCfg_rd);
    if(pmicStatus != PMIC_ST_SUCCESS)
    {
    Tp6594Pmic_log("Failed %s():%d\n", __func__,__LINE__);
    }
    #ifdef ENABLE_PMIC_DEBUG
    Tp6594Pmic_log("Tps6594 ESM Delay1: 0x%x\n", esmCfg_rd.esmDelay1_us);
    Tp6594Pmic_log("Tps6594 ESM Delay2: 0x%x\n", esmCfg_rd.esmDelay2_us);
    Tp6594Pmic_log("Tps6594 ESM EnDrv: 0x%x\n", esmCfg_rd.esmEnDrv);
    Tp6594Pmic_log("Tps6594 ESM Mode: 0x%x\n", esmCfg_rd.esmMode);
    #endif

    /* Enable ESM_MCU_EN*/
    pmicStatus = Pmic_esmEnable(pPmicCoreHandleI2C, esmType, esmToggle);
    if(pmicStatus != PMIC_ST_SUCCESS)
    {
    Tp6594Pmic_log("Failed %s():%d\n", __func__,__LINE__);
    }
    pmicStatus = Pmic_esmGetEnableState(pPmicCoreHandleI2C, esmType, &esmState);
    if(pmicStatus != PMIC_ST_SUCCESS)
    {
    Tp6594Pmic_log("Failed %s():%d\n", __func__,__LINE__);
    }

    /* To clear the interrupts*/
    pmicStatus = Pmic_irqGetErrStatus(pPmicCoreHandleI2C, &errStat, true);

    pmicStatus = Pmic_esmStart(pPmicCoreHandleI2C, esmType, PMIC_ESM_START);
    if(pmicStatus != PMIC_ST_SUCCESS)
    {
    Tp6594Pmic_log("Failed %s():%d\n", __func__,__LINE__);
    }

    }

     Please do get me the answer to the question
    sorry i didn't get your questions completely, can you please elaborate little for me to understand better.

    Regards,

    Prasad.

  • Hi Prasad,

    Due to national holiday in US, most of the experts are out of office today. Please expect delay in response. Thanks for your patience!

    Regards,

    Ishtiaque