SPI_MASTER App with more than one slave select lines

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

cross mob
Andi_H
Employee
Employee
First solution authored First like received
Hello,

i have problems with more than one ss-lines.

The picture below shows the app help for the "SPI_MASTER_EnableSlaveSelectSignal" function.

But it doesnt work!

2144.attach

in the generated files for SPI_Master i see:

2145.attach

is there an failure (red marked parts)?

Thanks for help.
Andi
0 Likes
3 Replies
Not applicable
HI Andi,

This issue is known and was reported earlier. This is an error in documentation and the code to enable a slave should be:
The last argument is an enum, which can be replaced with integer values.

SPI_MASTER_EnableSlaveSelectSignal(&SPI_MASTER_0, SPI_MASTER_SS_SIGNAL_1);


See the following thread. https://www.infineonforums.com/threads/4160-Possible-bug-in-SPI_MASTER-app

As for the red marked parts, the slave select for ".slave_select_ch" depends on the selected pins.
Each pin is marked to different slave select lines, SELOx.

For instance, in XMC4400:
U1C1.SELO0 - P0.9 or P0.12
U1C1.SELO1 - P0.2 or P3.3

This is the same observed in the generated code. 🙂

Regards,
Daryl
0 Likes
Andi_H
Employee
Employee
First solution authored First like received
Thanks,

everything is fine now.

Andi
0 Likes
Not applicable
Sorry i have a related but different question.
If I want to change the port_config from high to low and back again (the slave works on low CS), how do I do that in coding?
I tried like this but ofcourse it doesnt work
SPI_MASTER_0_SS_1_Config.port_config.output_level = XMC_GPIO_OUTPUT_LEVEL_LOW;

How do I change level of slave select lines in software? I am using SPI_MASTER_APP
0 Likes