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.

TDA4VM: SDL POK Re-configuration of Trim for Test Purpose Failed

Part Number: TDA4VM

Hi TI Experts,

I am trying to test POK monitoring for our project. Here is my test code:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
void SdlPok_Init(void)
{
int32_t retVal;
SDL_POK_Inst instance;
SDL_POK_config pPokCfg;
instance = SDL_POK_VDD_CORE_UV_ID;
pPokCfg.voltDetMode = SDL_PWRSS_SET_UNDER_VOLTAGE_DET_ENABLE;
pPokCfg.trim = 127;
/* Unlock the MMR in order to access the POK registers */
*((uint32_t *)(SDL_WKUP_CTRL_MMR0_CFG0_BASE + SDL_WKUP_CTRL_MMR_CFG0_LOCK6_KICK0)) = KICK0_UNLOCK_VAL;
*((uint32_t *)(SDL_WKUP_CTRL_MMR0_CFG0_BASE + SDL_WKUP_CTRL_MMR_CFG0_LOCK6_KICK1)) = KICK1_UNLOCK_VAL;
retVal = SDL_POK_init(instance, &pPokCfg);
if(retVal != SDL_PASS)
{
while(1)
{
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I can see the system is not stuck in the infinite loop, hence 

SDL_POK_init() and 
SDL_POK_verifyConfig() returns passed. 
After the test code has been run, I can see that the trim value for POR_VDD_CORE remains unchanged!
Setting of the trim value is failed. Seems the SDL_POK_Init() is not working but returns SDL_PASS.
"The CTRLMMR_WKUP_PRG0_CTRL.POK_EN_SEL bit has a reset value of zero which means POK enablement comes from hardware tie-offs (please reference screenshot below from the TDA4VM TRM).  If the POK is not enabled with hardware tie-offs, the CTRLMMR_WKUP_PRG0_CTRL register could be initialized by software to enable VDDAR_MCU, VDDSHV0_MCU, VDD_MCU, VDDAR_MCU, VDDSHV0_MCU, and VDDA_PMIC_IN POK detections."
And I can see my TDA4, POK_EN_SEL = 0, which means POK enablement comes from hardware tie-offs.
In this case, does it mean that I cannot modify the trim values of POK modules even with SDL POK APIs?
Thanks.
  • Hi, 

    I found that the POK unlock register shows the POK registers are still locked. Anything wrong about the unlocking?

    /* Unlock the MMR in order to access the POK registers */
    *((uint32_t *)(SDL_WKUP_CTRL_MMR0_CFG0_BASE + SDL_WKUP_CTRL_MMR_CFG0_LOCK6_KICK0)) = KICK0_UNLOCK_VAL;
    *((uint32_t *)(SDL_WKUP_CTRL_MMR0_CFG0_BASE + SDL_WKUP_CTRL_MMR_CFG0_LOCK6_KICK1)) = KICK1_UNLOCK_VAL;

  • Haomin, 

    Just doing some clean-up of items on our tracking list - this was there, but there were other queries by you on POK that I recall got addressed in the interim.  Is this still a valid question requiring response? 

    John

  • Hi John,

    This thread can be closed now. 

    This problem was solved with adding some delay after unlocking the LOCK6 registers. It seems that unlocking the registers will need some time and will not take effect immediately.

    Thanks.