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

cross mob
jsmith678x
Level 4
Level 4
100 sign-ins 25 replies posted First solution authored

Hi,

There is an official example: SPI_SLAVE_EXAMPLE_XMC4500 and there is a documentation Readme_SPI_SLAVE_EXAMPLE_XMC45.pdf in the folder. The documentation says: 'In this project two USIC channels of a XMC4500 device are communicating in a Loop-Back, one acting as Master and another as Slave in the same SPI bus.'. It is not clear for me how two different USIC channels are connected to each other. I checked the USIC interconnections in the reference manual but still not clear. Could somebody explain this?

 

0 Likes
1 Solution
ncbs
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 sign-ins

Hi @jsmith678x,

XMC4500 has 3 USIC blocks, and each USIC block contains 2 channels.

ncbs_0-1647677930805.png

In the code example, channel 0 of USIC block 1 (U1C0) is used for SPI master and channel 1 of USIC block 1 (U1C1) is used for SPI master. The following table shows the pins used in the code example.

ncbs_1-1647678415936.png

These pins have to be manually connected so that SPI master and SPI slave can communicate with each other.

 

Regards,
Nikhil

 

 

View solution in original post

0 Likes
3 Replies
ncbs
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 sign-ins

Hi @jsmith678x,

XMC4500 has 3 USIC blocks, and each USIC block contains 2 channels.

ncbs_0-1647677930805.png

In the code example, channel 0 of USIC block 1 (U1C0) is used for SPI master and channel 1 of USIC block 1 (U1C1) is used for SPI master. The following table shows the pins used in the code example.

ncbs_1-1647678415936.png

These pins have to be manually connected so that SPI master and SPI slave can communicate with each other.

 

Regards,
Nikhil

 

 

0 Likes

Thanks for the response.

Why the Loop-Back pins are used? Is there any special reason?

 

0 Likes
ncbs
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 sign-ins

Hi @jsmith678x,

I guess you are referring to the following: "In this project two USIC channels of a XMC4500 device are communicating in a Loop-Back, one acting as Master and another as Slave in the same SPI bus". 

The master is sending data to the slave. The slave, upon receiving this data, sends it back to the master. This configuration is referred to as loop-back communication.

Any pins may be chosen for master and for slave. Make sure the pins of the same channel are used for a communication block (master or slave).

Regards,
Nikhil

0 Likes