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.

AM5716: Board_GetPMICOffset() possible issue

Part Number: AM5716
Other Parts Discussed in Thread: TPS659037

Please see the following function in pdk_am57xx_1_0_6\packages\ti\board\src\idkAM571x\device\pmic_device.c:

uint32_t Board_GetPMICOffset(uint32_t voltOffset, pmic_data_t *pmic)
{
    uint32_t offsetCode;

    offsetCode = (26 + ((voltOffset - 700)/10)) & 0x7F;

    return offsetCode;
}

The calculation of offsetCode does not take into account the following information from the TRM: "In some cases, the AVS Class 0 voltage that is read from the CTRL_CORE_STD_FUSE_OPP_VMIN_xxx_y registers has a value between two incremental voltage steps of the power supply. If such a case occurs, the higher voltage value should be selected." The TPS659037 step size is 10 mV, so the correct calculation would be:

offsetCode = (26 + ((voltOffset - 700 + 9)/10)) & 0x7F;


Note that this is consistent with how the offset is calculated in PmhalTps659037VoltageToVselOffset() in the PM LLD (pdk_am57xx_1_0_6\packages\ti\drv\pm\src\pmhal\prcm\pmhal_tps659037.c):

/* The vsel is always chosen to be greater than equal to the AVS
* voltage.
*/
*vsel = (((voltage - regulator->minVolt) + (regulator->stepVolt - 1U)) / regulator->stepVolt) + regulator->minVoltVsel;

Best regards,
Dave

  • What software SDK is this?
  • This is in the latest release of PROCESSOR-SDK-RTOS-AM57X.

  • Dave,

    We are looking into the Power management implementation in the board library more closely especially since you reported the the ABB issue last week and have added high priority to adding the PM LLD support to the board library before the next release as it is critical to setup the AVS And ABB during wake up especially when the SOC will be running for longer period of time.

    In general, the PM LLD is more accurate in terms of providing these features so at high level it does appear to be an issue with the board library local implementation of this functionality. I will discuss this more with the systems team and get back to you on this issue.

    Regards,
    Rahul
  • Rahul, that's great news! I think this will be a very valuable addition to the board library.

    It's unfortunate, but understandable, that you are maintaining "duplicate" implementations of the same functionality -- one in the board library, and one in the PM LLD. I presume this is because the board library is intended to contain a minimum amount of functionality, and thus a small footprint. However, if might be worth considering whether the PM LLD could be built/linked in such a way that its essential functions could be called by the board library, thus reducing the likelihood of omissions (and hopefully simplifying your maintenance) in the board library code. It would probably be a fair amount of work... but I'm just sharing a thought.

    Thanks,
    Dave
  • For anyone else who might be interested, the Board_GetPMICOffset() function was updated with my suggested fix in PDK version 1.0.7 (the file is pdk_am57xx_1_0_7\packages\ti\board\src\idkAM571x\device\pmic_device.c).