ipipsu
Vitis Drivers API Documentation
xipipsu_self_test_example.c File Reference

Overview

This file consists of a self test example which uses the XIpiPsu driver to send an IPI message to self and get a response Each IPI channel can trigger an interrupt to itself and can exchange messages through the message buffer.

This feature is used here to exercise the driver APIs. Example control flow:

  • Init the IPI and GIC drivers
  • Setup Interrupt System with IPI handler which inverts the received message and sends back as response
  • Write a Message and Trigger IPI to Self.
  • Keep polling for response till timeout
  • Interrupt handler receives IPI and sends back response
  • Read the received response and do a sanity check
  • Print PASS or FAIL based on sanity check of response message
MODIFICATION HISTORY:
Ver  Who Date     Changes


2.2 ms 01/23/17 Modified xil_printf statement in main function to ensure that "Successfully ran" and "Failed" strings are available in all examples. This is a fix for CR-965028.

2.14  ht  05/30/23 Added support for system device-tree flow.

Functions

void IpiIntrHandler (void *XIpiPsuPtr)
 Interrupt Handler : -Polls for each of the valid sources -Checks if there is a message -Reads the message -Inverts the bits -Sends back the inverted message as response. More...
 
int main ()
 

Function Documentation

void IpiIntrHandler ( void *  XIpiPsuPtr)

Interrupt Handler : -Polls for each of the valid sources -Checks if there is a message -Reads the message -Inverts the bits -Sends back the inverted message as response.

< Holds the IPI status register value

< Holds the received Message, later inverted and sent back as response

References XIpiPsu::Config, XIpiPsu_Target::Mask, XIpiPsu_Config::TargetCount, XIpiPsu_Config::TargetList, XIPIPSU_BUF_TYPE_MSG, XIPIPSU_BUF_TYPE_RESP, XIpiPsu_ClearInterruptStatus, XIpiPsu_GetInterruptStatus, XIpiPsu_ReadMessage(), and XIpiPsu_WriteMessage().