MicroBlaze SPI interrupts

Hello All,

I'm on a project which has ballooned in scope such that it calls for implementing the MicroBlaze (originally it called for a straight forward PicoBlaze, but that's a long story ...)

I have successfully created custom peripherals and have implemented the code to control them from my device MMI. Thus, I'm mildly savvy wrt Xilinx EDK. However, I cannot get my SPI (EEPROM) peripheral to play nice-nice with the rest of the project.

The transfer will begin successfully via XSpi_Transfer(...) but SS (CS) never de-asserts. The only work around I have come up with is XSpi_Reset(...), but that is pretty ugly and will more than likely present problems further down the road. I have a suspicion that I am not initalizing the SPI status handler or the interrupt controller correctly. I'd be the first to admit that I haven't dealt with interrupts since a really crappy lab on them in undergrad ....

I apologize in advance if I haven't furnished enough information to help me. I'm more of a squishy analog hardware type. Any advice or application notes that are applicable would be greatly appreciated.

Thanks, Matt

Reply to
Loading thread data ...

snipped-for-privacy@gmail.com schrieb:

see at end. defenetly working code that reads ST serial flash ID code using OPB_SPI no interrupts though, but you should be able to use the code to verify the basic SPI operations


// SPI Xuint16 Control; Xuint8 SpiBuffer[32]; int NumBytesSent; int NumBytesRcvd;


int SPI_transfer(int count) { //

int i;

NumBytesSent = 0; NumBytesRcvd = 0;

/* * Set up the device in loopback mode and enable master mode */ XSpi_mSetSlaveSelectReg(SPI_BASEADDR, 0xFFFFFFFF);

/* * Fill up the transmitter with data, assuming the receiver can hold * the same amount of data. */ for (i=0;i

Reply to

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.