Reading FPD Locked Status from RPU - 2023.1 English

Zynq UltraScale+ MPSoC Software Developer Guide (UG1137)

Document ID
UG1137
Release Date
2023-08-04
Version
2023.1 English
Register 0xFFD600F0 is a local register to PMU firmware, in which bit 31 displays whether FPD is locked or not locked. (If bit 31 is set to 1, then FPD is locked. It remains isolated until POR is asserted). You can verify the FPD locked status by reading this register through PMU firmware. This can be achieved by an MMIO read call to PMU firmware. Use the following steps to read FPD locked status from R5:
  1. Create an empty application for R5 processor. Enable xilpm library in BSP settings.
  2. Create a new.c file in the project and add the following code:
    #include "xipipsu.h"
    #include "pm_api_sys.h"
    #define IPI_DEVICE_IDXPAR_XIPIPSU_0_DEVICE_ID
    #define IPI_PMU_PM_INT_MASKXPAR_XIPIPS_TARGET_PSU_PMU_0_CH0_MASK
    
    #define MMIO_READ_API_ID20U
    #define FPD_LOCK_STATUS_REG0xFFD600F0
    
    int main(void)
    {
    XIpiPsu IpiInstance; XIpiPsu_Config *Config; s32 Status;
    u32 Value;
    
    /* Initialize IPI peripheral */
    Config = XIpiPsu_LookupConfig(IPI_DEVICE_ID); if (Config == NULL) {
    xil_printf("Config Null\r\n"); goto END;
    }
    
    Status = XIpiPsu_CfgInitialize(&IpiInstance, Config, Config->BaseAddress);
    if (0x0U != Status) { xil_printf("Config init failed\r\n"); goto END;
    }
    
    /* Initialize the XilPM library */ Status = XPm_InitXilpm(&IpiInstance); if (0x0U != Status) {
    xil_printf("XilPM init failed\r\n"); goto END;
    }
    /* Read using XPm_MmioRead() */
    Status = XPm_MmioRead(FPD_LOCK_STATUS_REG, &Value); if (0x0U != Status)
    {
    xil_printf("XilPM MMIO Read failed\r\n"); goto END;
    }
    xil_printf("Value read from 0x%x: 0x%x\r\n",FPD_LOCK_STATUS_REG, Value);
    
    END:
    xil_printf("Exit from main\r\n");
    }
    
Note: This application must be run after FSBL is successfully executed. This application cannot run successfully, if FSBL fails to send configuration object to PMU firmware.