For a bit rate of 12 Mbit/s your provided 2MHz clock will not work. Better to choose internal clock for the SPI slave.
You set the internal interrupt which will handle all receive, but will not allow you to handle reading data from component. See the interrupts section in the datasheet.
You fill your Tx buffer each time the interrupt handler is called which will burn lots of MIPS.
I would suggest you to Increase the SPIS Rx and Tx buffers to 30bytes and let the component handle all the transfers automatically.
You can use a callback macro for detecting the initial byte of 0x55 or 0xff and then filling the Tx buffer appropriately once. Look into datasheet for "SPIS_RX_ISR_ExitCallback" for the right callback macro name.
Do not forget to clear the Rx Buffer after a complete transaction.
I am new to PSoC.
Can you please let me know how callback macro is useful?
Based on the contents of first few bytes received, the data to Master would get changed.
How can this be done?
Callback macros are explained in Creator Help. They are not interrupts, but may be an extension to a component interrupt. An example:
I2C component has just a single interrupt that fires before any internal processing is done. But there are four (4) Calback macros defined that are called before and after the processing.