Hi,
I'm testing the mcSPIFlash_edma example that is provided in the Starterware 02_00_00_05 and this example works well so far on the EVM board evaluation module.
For my typical testing I need to use an external Chip select (I cannot use functions provided by SPI API to drive the chip select)
To be able to use SPI in 3 pins I tried to modify the example mcSPIFlash_edma.
- I comment the functions: McSPI0CSPinMuxSetup(MCSPI_CH_NUM), McSPICSEnable(SOC_SPI_0_REGS), McSPICSPolarityConfig(SOC_SPI_0_REGS, MCSPI_CS_POL_LOW, MCSPI_CH_NUM), McSPICSAssert(SOC_SPI_0_REGS, MCSPI_CH_NUM) and McSPICSDeAssert(SOC_SPI_0_REGS, MCSPI_CH_NUM).
- I declare the CS pin (SPI0_CS0) in GPIO mode to drive it out of the functions of SPI API.
- Before a read or write SPI action a put the SPI0_CS0 pin at the low level using GPIOPinWrite() and put it back in the high level at the end of the read or write.
Unfortunately, it's not working. No communication is done by EDMA so I’m not catching any interrupt from it to set the flagTx and flagRx. So I get stuck in the while((0 == flagTx) || (flagRx == 0)).
Is there a typical configuration to set the SPI module to use it in 3 pins mode?
Frederic