In our application for the TMS570LC4357 processor, we are interfacing the Serial Flash "S25FL256S" via SPI3 with the baud rate of 5MHz. In our system the clock configuration(in MHz) are : OSC = 20, PLL1 = 180, GCLK = 180, HCLK = 90 and VCLK1 = 90. The SPI is used in 4-Pin Mode i.e. SPI3CLK, SPI3SIMO, SPI3MISO & SPI3CS_0, and the SPI3 Pin configuration registers i.e. (PC0-PC8) are used only for configuring these 4 pins accordingly. Here, SPI3 is in Master Mode and the CSHOLD bit kept true.
When we are trying the communicate with the external serial flash, by configuring the SPI3CS_0 as functional and keeping the CSNR value as 0xFE, at the 5MHz rate we are not receiving the proper data configured, and every time it is getting read as 0xFF. We tried reducing the baud rate even we tried by configuring the different CSNR values such as 1,0xFF and 0xFD but still not able to establish the proper communication.
However, when we tried by configuring the SPI3CS_0 as GIO and then manually asserting/deasserting the chip selects before reading/writing the data (keeping the same configuration as mentioned in 1st paragraph), in that case, we are properly able to establish the communication with that external chip.
Thus, request you to help me in understanding, where exactly could it be going wrong whenever we are using the ChipSelect as SPI functional and how can I establish the communication using just the SPI as functional not as a GIO.