TC275 QSPI iLLD driver queuing of frames and user callback

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

cross mob
User18855
Level 1
Level 1
Do we have the following feature in QSPI iLLD drivers required for my application.

Can we get callback to the application to inform when DMA is done for all the frames. ?

Any help/ideas on the above would be appreciated. The above requirement is mandatory for my application to work with the driver.

Thanks,
Saravanan
0 Likes
4 Replies
NeMa_4793301
Level 6
Level 6
10 likes received 10 solutions authored 5 solutions authored
The iLLD implementation of IfxQspi_SpiMaster_isrDmaReceive doesn't have a callback. If you don't mind patching the code, you could add one yourself.
0 Likes
User18855
Level 1
Level 1
Thanks for the reply UC_wrangler.

So we would do the callback when the SLSO is deactivated in IfxQspi_SpiMaster_isrDmaReceive as below right?

if (IfxDma_getAndClearChannelInterrupt(dmaSFR, rxDmaChannelId))
{
if (chHandle->deactivateSlso != NULL_PTR)
{
chHandle->deactivateSlso(chHandle);
}

chHandle->base.flags.onTransfer = 0;
IfxQspi_SpiMaster_unlock((IfxQspi_SpiMaster *)chHandle->base.driver);

/* Call the application callback */
}


Further a follow up question was that we needed to initiate the next SPI frame in a sequence also in the callback. Basically the idea is to complete a set of SPI frames back to back in callbacks and when the callback is received for the last frame we consider the sequence as complete.
Any other issues you see in the approach.
0 Likes
NeMa_4793301
Level 6
Level 6
10 likes received 10 solutions authored 5 solutions authored
Looks like a good spot. Note also that deactivateSlso is only used when the hardware SLSO is not used.

You could write a higher level queueing function, but it's often more advantageous to use DMA linked lists to perform multiple operations without CPU intervention.
0 Likes
Spartan2614
Level 1
Level 1
10 replies posted 5 likes given 25 sign-ins

Can any one provide me proper example Of Queue Implementation in Any Infineon example i have to implement Queue in channel 2 with 4 slaves  which i need to implement in Queue  , can anybody please help me with that. 

0 Likes