4.7. POK: Power OK

4.7.1. Introduction

This device has several internal voltage monitors called Power OK (POK). These monitors can be configured to detect undervoltage (UV) or overvoltage (OV) conditions, and to report errors via ESM. SDL provides the support for programming of the POK modules, including the internal POKs for the POR module. The threshold limits can be configured, and the POK monitoring enabled. Programming is generally done at init time. All POK modules are in the wakeup domain.

POK modules are responsible for monitoring and accurately detecting voltage levels. POK modules are capable of monitoring a range of supplies and indicating a failure within the programmable upper and lower threshold limits for the supply being monitored. POKs are used to monitor voltage supply levels with programmable threshold levels. As an example, the POK programmable threshold resolution is 12.5mV for the threshold setting range from 0.475V to 1.35V for under voltage protection.

This module provides the following functionality:

  • Ability to initialize a POK

  • Ability to verify written POK configuration

  • Ability to readback of written configuration

There are two types of POK modules implemented in the J721E family of devices - POK and POK_SA.

The POK has the below over voltage and under voltage detection range values.

POK

Under Voltage Detection

Over Voltage Detection

Step Resolution

CORE_POK

475mV - 1.35V

725mV - 1.65V

0.0125V

POK1.8

1.432V - 2.168V

1.432V - 2.168V

0.02V

POK3.3

2.625V - 3.975V

2.625V - 3.975V

0x0375V

There are 13 POK instances and a single POK_SA instance (Total of 14 POK modules) in J721E. Additionally, there are 3 POK modules in POR.

4.7.2. Example Usage

The following shows an example of SDL POK API usage by the application to set up the POK and usage of the POK APIs. Events can be monitored by enabling the events in the associated ESM instance.

Initialize a POK Instance

int32_t sdlRet;
SDL_POK_config pokCfg;
SDL_POK_Inst instance;

instance = SDL_POR_POKHV_OV_ID;
pPokCfg.voltDetMode = SDL_PWRSS_SET_OVER_VOLTAGE_DET_ENABLE;
pPokCfg.trim = 0; // Configure the OV (Over voltage) POK to a small value to force an error
                  // Alternatively, can provide a good value

sdlRet = SDL_POK_init(instance, &pokCfg);
if (sdlRet != SDL_PASS)
{
    UART_printf("SDL_POK_init failed! \n");
}

/* If ESM event comes, then Over voltage condition is reached */

Verify the Written Config (can be called after SDL_POK_init)

int32_t ret;

/* Pass the expected config */
ret = SDL_POK_verifyConfig(instance, &pokCfg);
if (ret != SDL_Pass)
{
    // verification failed
}

Read back the Static Registers

int32_t ret;
SDL_POK_staticRegs staticRegs;

ret = SDL_POK_getStaticRegisters(instance, &staticRegs);
if (ret != SDL_PASS)
{
    // failed to get static regs
}

4.7.3. Examples

The POK module provide a Safety Example to show how to use POK for injecting an error and checking the error response, and also ESM application callback usage. Details regarding the POK Safety Example can be found here.

Test apps that are meant for verifying the functionality of the module are also provided.

Test App Name

Description

Location

Build Command

sdl_pok_test_app

  • Configures each POK instance

  • Triggers the error events

  • Checks for error response

[sdl_install_dir]/test/pok/

make sdl_pok_test_app PROFILE=release

4.7.4. API

POK API Guide