Requesting and Releasing a Device From a Standalone Application - 2024.1 English

Versal Adaptive SoC System Software Developers Guide (UG1304)

Document ID
UG1304
Release Date
2024-05-30
Version
2024.1 English

The application needs to call XPm_RequestNode(). to request usage of peripheral/device. For example:

XStatus XPm_RequestNode (const u32 DeviceId, const u32 Capabilities, const u32 QoS, const u32 Ack);

The arguments are as follows:

Device ID
Device ID of the PM device to be requested.
Capabilities
Device-specific capabilities are required, and can be combined. The capabilities include:
  • PM_CAP_ACCESS: Full access / functionality
  • PM_CAP_CONTEXT: Preserve context
  • PM_CAP_WAKEUP: Emit wake interrupts
  • PM_CAP_UNUSABLE: Runtime suspend (Device is requested for a subsystem but the device is clock disabled)
  • PM_CAP_SECURE: Secure access type (non-secure/secure)
  • PM_CAP_COHERENT: Device coherency
  • PM_CAP_VIRTUALIZED: Device virtualization

For more information, see BSP and Libraries Document Collection (UG643).

QoS
Quality of Service (0-100) is required.
Note: Currently QoS is only used for AI Engine clock frequency scaling and represents the divider value for the AI Engine clock. See AI Engine Clock Frequency Scaling.
Ack
Requested acknowledge type.
Note: This argument is used only for Zynq UltraScale+ MPSoCs. For Versal devices, this argument value is always set to blocking.

If a device is already requested by a subsystem, you can call XPm_SetRequirement() to change its requirement. For example:

XStatus XPm_SetRequirement (const u32 DeviceId, const u32 Capabilities, const u32 QoS, const u32 Ack);

The application must release the device when it is no longer required. To release the device, call XPm_ReleaseNode(). For example:

XStatus XPm_ReleaseNode (const u32 DeviceId);