Вы пользуетесь low-level function XSpi_mSetControlReg из xspi_l.h, я так никогда не делал. Я пользуюсь только функциями из xspi.h, для SPI Configuration использую XSpi_SetOptions() функцию. Может Вы попробуйте:
Код
//Initial SPI function - assume global MY_Spi
void InitSPI (Xspi *MY_Spi)
{
Xuint32 status; //SPI readback variable
XSpi_Initialize(MY_Spi,XPAR_OPB_SPI_0_DEVICE_ID);
XSpi_Start(MY_Spi);
//XSpi_mSetControlReg(XPAR_OPB_SPI_0_BASEADDR, (XSP_CR_ENABLE_MASK |
//XSP_CR_MASTER_MODE_MASK | XSP_CR_MANUAL_SS_MASK));
// Run a self-test using the RS-232 debug port, omit if no RS-232 debug port in the system
status = XSpi_SelfTest(MY_Spi);
if (status == XST_SUCCESS) {
xil_printf("SPI selftest successful\r\n");
}
if (status == XST_REGISTER_ERROR) {
xil_printf("SPI register did not read or write correctly\r\n");
}
if (status == XST_LOOPBACK_ERROR) {
xil_printf("SPI loopback error has occurred\r\n");
}
// Enable SPI in MASTER_MODE with MANUAL slave selection;
XSpi_SetOptions(MY_Spi, (XSP_MASTER_OPTION | XSP_MANUAL_SSELECT_OPTION));
}
In Mozilla, you keep tabs on your browser. In the USSR, your browser keeps tabs on you.