Tool/software: TI-RTOS
Hi,
In my code,I want to generate an interrupt when spi write happens. I am using SPI2 and SPI is in slave mode . For interrupt generation, I did the following,
void AnalogOutputDACISRHandler()
{
uint32_t ui32Status;
int count=0;
GPIO_toggle(Board_LED2); // Given for testing purpose
if (count <= 100) {
count ++;
}
/* Read the interrupt status of the SSI. */
ui32Status = SSIIntStatus(SSI2_BASE, TRUE);
SSIIntClear(SSI2_BASE, ui32Status);
}
And in the function from which interrupt should be generated, I have given
SSIIntRegister(SSI2_BASE, AnalogOutputDACISRHandler);
SSIIntEnable(SSI2_BASE,SSI_TXFF);
In spi.h I have seen a function ,
SPI_serviceISR(SPI_Handle handle)
Is this function needed? Where to use this?
Is anything else needed to generate SPI interrupt? Please guide me.
Thanks & Regards
Sandra