spi clock pause before the last word

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

cross mob
User19977
Level 2
Level 2
5 replies posted 5 questions asked First reply posted
Hi there,

I am using Infineon MCAL and TC275. the spi signals are aligned with 32-bit word. there was a pause of clock before the last word was on the bus.
5133.attach
I have to use ‘CS_VIA_PERIPHERAL_ENGINE’ because I need to insert a large cs-to-clock delay. I know I won't have the issue if using 'CS_VIA_GPIO'.

How to work-around?

Thanks, Ke
0 Likes
3 Replies
NeMa_4793301
Level 6
Level 6
10 likes received 10 solutions authored 5 solutions authored
I don't think there is a workaround, because of the way the TC2xx QSPI peripheral works.

With CS_VIA_PERIPHERAL_ENGINE (i.e., QSPI internal handling of CS), to send 8 bytes, you have to send 7, set BACON.LAST, and then send the last word. The gap you're seeing is the delay in the CPU handling the interrupt.

You can get this to shrink to almost nothing if you use 3 DMA transaction sets instead of relying on the CPU, but even DMA can have a couple hundred nanoseconds of latency.

In TC3xx hardware, QSPI supports a new Move Counter mode that activates CS, sends bytes, and then deactivates CS, without the little two-step shuffle that is necessary in TC2xx.
0 Likes
User19977
Level 2
Level 2
5 replies posted 5 questions asked First reply posted
Thanks for your help.

which interrupt is to handle the BACON.LAST? I am thinking to raise the priority. And how to config the MCAL to use the '3 DMA transaction'?

Thanks, Ke
0 Likes
NeMa_4793301
Level 6
Level 6
10 likes received 10 solutions authored 5 solutions authored
The interrupt function in the MCAL SPI driver is Spi_IsrDmaQspiTx.

The MCAL doesn't support using a DMA linked list. You would have to craft your own complex driver.
0 Likes