Event Management in Standalone Application - 2021.1 English

Versal ACAP System Software Developers Guide (UG1304)

Document ID
UG1304
Release Date
2021-06-16
Version
2021.1 English

For Standalone application agent needs to use XPm_Register_Notifier () of XilPM Client Lib to gets notify for any specific event(s). If an agent is no longer interested in receiving notification about events related to the node that the callback was previously registered, use XPm_Register_Notifier () for de-registration.

The caller shall initialize the notifier object before invoking the XPm_RegisterNotifier() with the following parameters.

NodeID
ID of the node to be notified about.
eventId
ID of the event in question, events (EVENT_STATE_CHANGE, EVENT_ZERO_USERS, EVENT_ERROR_MASK)
wake: true:
wake up on event, false: do not wake up (only notify if awake), no buffering/queuing
callback
Pointer to the custom callback function to be called when the notification is available. The callback executes from interrupt context, so you must take special care when implementing the callback. Callback is optional, may be set to NULL.

In case of when any event occurred, the agent will get data in the following format as payload.

Table 1. Payload Data for Error Event Notification
Reserved [12-15] Event Mask [8-11] NodeID [4-7] Callback Type [0-3]
Table 2. Payload Data for Device/Power Node Related Events
Node state [12-15] Event ID [8-11] NodeID [4-7] Callback Type [0-3]

Once the agent catches the notification check for the Callback type. In case of call back type is PM_NOTIFY_CB, agent needs to call XPm_NotifyCb().

For more information, refer to the OS and Libraries Document Collection (UG643).