Sep 03, 2021
04:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 03, 2021
04:22 AM
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
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
- Tags:
- IFX
4 Replies
Sep 03, 2021
06:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 03, 2021
06:33 AM
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.
Sep 06, 2021
04:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 06, 2021
04:17 AM
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.
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.
Sep 07, 2021
05:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 07, 2021
05:55 AM
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.
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.
Dec 29, 2021
03:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 29, 2021
03:42 AM
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.