Hello @Saitej,
When you set the SPI to call a callback is possible to achieve this. If you set a name to the callback:

And in your main code you will need to set a function with the following syntax:
SPI1_Callback(void *driverState, spi_event_t event, void *userData);
In the event parameter, the SPI_EVENT_END_TRANSFER event is called if the transfer is finished.
Let me know if this helps you.
Best Regards,
Alexis Andalon