RT1052 : How to configure standard GPIO as SPI CS ?
First You may have to check the datasheet of the MCU to confirm if the particular pin of interest has SPI_CS capability. if it does, then use the PORT Control Module PCM to select the correct ALT function. In that case, when you begin an SPI transaction, the SPI module will itself manage the assertion and desertion of the Cs pin. However, You can use a standard GPIO as SPI_Cs. Just configure it as GPIO_output pin. In this case, the responsibility of asserting the pin and deserting the pin lies on you.
Hi Richard,
I'm using S32K144 device where I would like to assert a PIN along with CS after transferring all bits .
Also, I can't use the TRGMUX inputs since the port I want to assert is not connected to TRGMUX inputs.
I also tried waitng till
while((LPSPI0->SR & LPSPI_SR_FCF_MASK)>>LPSPI_SR_FCF_SHIFT==0) {}
but, stranges the FCF flag will set immeadiately after writing the data into the tranmit buffer though theCS still holds the LOW.
Kindly help in this regard,
Raju