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.
Hi TI Experts,
I am trying to test POK monitoring for our project. Here is my test code:
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) { } } /* Pass the expected config */ retVal = SDL_POK_verifyConfig(instance, &pPokCfg); if (retVal != SDL_PASS) { while(1) { } } }
I can see the system is not stuck in the infinite loop, hence
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.