Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Guillermo1
Level 1
Level 1
10 replies posted 10 sign-ins 5 replies posted

Hi everybody,

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?

Best regards,

Guillermo

 

0 Likes
2 Replies
Aashita_R
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 250 replies posted

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 -

Aashita_R_0-1704745331756.png

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 -

Aashita_R_1-1704745482273.png

 

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.

Best Regards,

Aashita

 

0 Likes

Hi @Aashita_R,

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.

Best regards,

Guillermo

 

0 Likes