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

XMC™ Forum Discussions

User17136
Level 1
Level 1
Hi all,

Using a XMC1400 for the first time and playing around with the HAL.
I'm currently trying out a spi program that basically gets sent data and then sends it back on the next transmit.
My issue is that all of my transmit data is fine except for the last byte, in which MISO is half a clock cycle over and is not matching.
I've gone though my settings (I'm using the standard daveApp SPI slave configured in interrupt mode, default pin settings).
I've also verified that my FIFO data is correct,

My program flow is basically:
1. Dave init
2. Wait for slave select then start transmitting data
3. Receive in data, and queue up that data to be transmitted on the next SPI

Picture for what I'm seeing (top is MOSI, 2nd is MISO):
3602.attach
Any help is appreciated.
0 Likes
1 Reply
User17136
Level 1
Level 1
Solution:
Using the XMC SPI module in interrupt mode requires arrays passed into it to be marked volatile. 🙂
0 Likes