Robots are revolutionizing our lives in many ways. Join our webinar to learn about Infineon’s broad portfolio of robot building blocks.
Click here to register.

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

AURIX™ Forum Discussions

Level 1
Level 1
First question asked Welcome!

Is there an alternative way to check the transfer of data stream if it is complete without using a while loop using the iLLD? (see image below)


Here's a brief picture of what we're trying to do.

Note that we are implementing this in a bare-metal based application (non-OS).

We have an ISR function running at a regular interval. This ISR function processes a pointer buffer that is filled with the SPI message. The ISR function is called via a timer so there's no problem there.

At some point in time even while the ISR function is running, we'd want to close the SPI port without interrupting the ISR for a long period of time. The SPI transaction in our application is approximately 2ms. While the ISR also runs at 2ms - but the ISR is a priority rather than the SPI transaction. Is there a way to complete the SPI transaction without using a while loop that will possibly block the ISR operation?

We also tried removing the while loop check and closed the SPI port, and it leaves the SPI or the DMA in a bad state. When code tries connect via the SPI, it does not work properly anymore. No SPI bytes are transferred on bus. 

1 Reply
25 likes received 50 solutions authored 250 sign-ins


The while condition checks for any data exchange in progress and this is needed to avoid a new exchange while previous is still in progress. But generally it shouldn't take too much time.

Also, I didn't full understand how you're saying that the while loop is blocking the ISR as the ISR always takes the higher priority than the normal execution.



This widget could not be displayed.