Hi,
I am trying to use the SPI peripheral of the Zynq, but it's not working.
After the SS0 pin is asserted, I trigger the manual start command, then the SPI SCLK signal goes crazy. It's not even a square wave. Please see the sample code below to reproduce this problem. All the SPI signals connects to the MIO[10:15] directly. Please let me know what I did wrong.
SpiConfig = XSpiPs_LookupConfig(SPI_DEVICE_ID);
XSpiPs_CfgInitialize(&SpiInstance, SpiConfig, SpiConfig->BaseAddress);
//Enable manual start, enable manual CS mode, no slave selected
//Buad rate = clk / 64, CPOL=0 CPHA=0, enable master mode
XSpiPs_WriteReg((&SpiInstance)->Config.BaseAddress,0x0,0xFC29);
//Enable the SPI peripheral, and the SS0 pin goes high
XSpiPs_WriteReg((&SpiInstance)->Config.BaseAddress,0x14,0x1);
//Write a value to the Tx_Data_reg
XSpiPs_WriteReg((&SpiInstance)->Config.BaseAddress,0x1C,0xAAAA);
//Assert SS0 pin, SS0 goes low
XSpiPs_WriteReg((&SpiInstance)->Config.BaseAddress,0x0,0xC029);
//start the SPI transaction by writing a 1 to the Man_start_com bit
//but the SCLK goes crazy endlessly as shown in the image attached.
XSpiPs_WriteReg((&SpiInstance)->Config.BaseAddress,0x0,0x1C029);