SPI communication with xmc 2go

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

cross mob
kapa_4844981
Level 1
Level 1
Hello all experts,

I am new to xmc 2go, trying to communication between xmc 2go and sensor using SPI communication protocol by direct mode.
I try with examples which is for xmc4500 but not work. Please help.
0 Likes
1 Solution
SudheeshK
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted
Hello,

XMC2Go kit uses XMC1100. Currently, there is no example project available to configure XMC2Go kit as SPI master. But, SPI_MASTER APP is available in Dave IDE for XMC1100 MCU.
After adding SPI_MASTER to your project, right click on it and go to "App Help" for more details about how to configure and use it in your application.

Please feel free to get back to us, if you need any assistance.

Thanks and Regards,
Sudheesh

View solution in original post

0 Likes
5 Replies
SudheeshK
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted
Hello,

XMC2Go kit uses XMC1100. Currently, there is no example project available to configure XMC2Go kit as SPI master. But, SPI_MASTER APP is available in Dave IDE for XMC1100 MCU.
After adding SPI_MASTER to your project, right click on it and go to "App Help" for more details about how to configure and use it in your application.

Please feel free to get back to us, if you need any assistance.

Thanks and Regards,
Sudheesh
0 Likes
kapa_4844981
Level 1
Level 1
Thank you for response,

As given in the app help i set all configuration parameters but not even got clock at output.
0 Likes
lock attach
Attachments are accessible only for community members.
SudheeshK
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted
Hello,

Sorry for the delay. Steps to configure the SPI_MASTER are given in "Usage" section of "App Help" documentation. Please double check, if you have configured the Rx and Tx interrupts for SPI master as mentioned in the documentation.
I am attaching an XMC1100 SPI master project with this response. It uses the SPI_MASTER Dave app and sends 3 bytes to data in a loop to the slave. I tested it with XMC1100 boot kit. You can build it for XMC 2 Go kit using the "Dave project upgrade->Device Migration" option that you get when you right click on a project.
You can use it as an example to develop your own project. Please let me know, if you are facing any issue.

Thanks and Regards,
Sudheesh
0 Likes
User21386
Level 1
Level 1
Good Day,

I am exploring the infineon designer using tina cloud for simulation. I used the SPI Master example above and was able to transmit modified messages and made a slave project in DAVE APPs for the second microcontroller. I can't seem to make the slave receive the transmitted message from the master. Maybe I'm doing something wrong with the code but I would like to confirm if it's even possible to do microcon-microcon communication in infineon designer?

Regards,
Minos
0 Likes
lock attach
Attachments are accessible only for community members.
SudheeshK
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted
Hello Minos,

Yes, it is possible to communicate between two micro controllers using SPI protocol. Please see the SPI master and slave example projects attached. Master will send characters from 'A' to 'Z' to the slave, slave will print the received characters using UART.

Regarding your project, please make sure that the bit order for SPI communication is matching between master and slave projects. Also, try changing the SPI master clock settings in the SPI Master Dave APP.

Thanks and Regards,
Sudheesh
0 Likes