I'm using a SPI channel in 'Dual SPI' mode, and I need to get data from two pins, but I don't know how to get the data of each pin independently.
What I know is that in the XMCLib library the function to get data is XMC_SPI_CH_GetReceivedData, that gets the data from a buffer called RBUF (or OUTR if buffering is active).
What I don't know is how to split the data returned of RBUF into the 2 channels data, read two times the RBUF or if I have to get the data from different buffers.
Any one knows how to read data from the 2 pins independently?
Hi @Guillermo1 ,
Apologies for the delayed response. Can you please let us know which device you are using? This is because, each device reference manual will have dedicated pins mentioned for Dual-SPI, such as the below image taken from XMC 4700 reference manual as an example -
For e.g- Below image is taken as an example given in XMC 4700 reference manual for Quad-SPI. For dual-SPI, we will the same kind of connections only with two I/Os at both Master and Slave side -
I hope this gives you an idea to get started with. However, please add your queries here regarding the same and I will guide you further.
Thanks for the response, the device I'm using is XMC 4700.
I resume how I have configured the SPI channel. I'm using the XMC_USIC0_CH0 channel with the following pins configured: the SCLK pin on the 1.10, the CS_0 pin in the 1.11, the miso0 in the 1.5 and the miso1 in the 1.4. The frame length is 32bits and the word length 16 bith.
I read on the reference manual something about data shifting, but I don't undertand it.
What I need is once I get the data know how to split it into the two differents variables for proccessing them independently.