To reduce the delay in assertion of SPI Line, you can assert the SSN by direct register control instead of calling CyU3PSpiSetSsnLine API.
Add the header in your code:
and instead of CyU3PSpiSetSsnLine (CyTrue), you can use direct register control as:
SPI->lpp_spi_config |= CY_U3P_LPP_SPI_SSN_BIT;
To de-assert the SSN, you can use
SPI->lpp_spi_config &= ~CY_U3P_LPP_SPI_SSN_BIT;
Also, please try to avoid unnecessary code overhead.
- Madhu Sudhan