Hello,
since the demo project "SPIDMAMode_21569" contained in "ADSP-2156x_EZ-KIT-Rel1.0.1" package shows us the implementation of a DMA transfer of byte arrays between two SPI ports in an ultra-simple way, wanting to implement the transfer of an entire packed struct I was asking myself the following questions:
1) Is provided example in "SPIDMAMode_21569" correct, from a cache-management point of view?
The only reference I see regarding cache in such example is the TX/RX buffer declaration and PDMA descriptors list:

Apart from the fact that I don't fully understand the need of aligning descriptor lists to a cache line, I see that no one is concerned with invalidating the data cache or flushing it, consequently I was wondering about who's taking care of cache coherence?
2) Assuming "SPIDMAMode_21569" example is correct, how do you expect me to round the size of a struct to fill the entire cache line?
ADI_CACHE_ROUND_UP_SIZE() macro works quite well with arrays, but not with structs; unless I declare a byte array of the size of my packed struct rounding it up to fill the entire cache line, then cast that memory area to the datatype of my structure...... seems a bit convoluted, am I missing something?
Thanks in advance to anyone who wants to contribute.
Edit Notes
fixed[edited by: SpoonMan999 at 5:39 PM (GMT -4) on 8 Apr 2025]


