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

XMC™ Forum Discussions

User16529
Level 4
Level 4
First solution authored
Hi!
I'm implementing an SPI daisy chain communication and i have some problem in sending and reading the 8th and 16th bit of the sent word. i'm usign the internal clk of my XMC4800 and since the first ISO chip is an output one, i set the clk as XMC_SPI_CH_BRG_SHIFT_CLOCK_PASSIVE_LEVEL_0_DELAY_D ISABLED.
The problem is that the 8th and the 16th bit of the sent word aren't in the MISO, so i'd like to know if there's a way to forse the clk to stay high when i need it.

I put a screenshot of the signals from the output ISO chip, the read one is the SCLK. In the MISO, don't look at the bit on the left, it's from an input ISO chip in daisy chain.

3595.attach
0 Likes
2 Replies
User16529
Level 4
Level 4
First solution authored
I've changed the clock configuration to XMC_SPI_CH_BRG_SHIFT_CLOCK_PASSIVE_LEVEL_1_DELAY_D ISABLED, according to the reference manual of ISO1H812G.
I have one 16bit ISO_out and one 16bit ISO_in in daisy chain configuration. The first 8 bits of the ISO_out are wired with the first 8bit of the ISO_in. I'm using ISO1I811T as input chip and ISO1H812G as output chip.
Here there is a screenshot of what i get on the MOSI and MISO when i send 0xFF00 to the output chip.

3597.attach

Since the inputs and the outputs are wire connected, I expect to see the same value from the input and the output chips in the MISO, but the value of the input chip is right-shifted and had losted a bit. I think that is because of the clock configuration that is the one for the ISO1H812G and it doesn't work properly for the ISO1I811T .
What I need is to change the clock configuration according to the chip is involved in the SPI communication, so i need to have the output clock configuration when the data is passing through ISO1H812G and the input clock configuration when the data is passing through ISO1I811T.
If i change the clock configuration dynamically from the firmware code, it has no effect, the clock doesn't change. I've also tried to modify the clock setting the SCLK pin low when i need it, but in this way the outputs doesn't work properly.
My question is: is there a proper way to switch between clock configuration? Or is there a way to generate a custom clock via software, avoinding the use of an external clock?

Thank you for any help.
0 Likes
User16529
Level 4
Level 4
First solution authored
Is there anyone who could help me with this SPI daisy chain problem?
0 Likes