eDMA ping-pong buffer sorting

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

eDMA ping-pong buffer sorting

Jump to solution
1,794 Views
Sandroom
Contributor III

Good day to all!
I use IMX8ULPIEC processor and i programming SAI interface under m-33 core.
I receive data in the format ABC_ABC_ABC_ABC... via eDma using the SAI_TransferReceiveLoopEDMA() function and thus receive a ping-pong buffer for two arrays storing ABCABCABC alternately.
However, I would like the data after reception to look like this: AAAA......BBBB......CCCC...(end) and also issued alternately in two buffers as in the ping-pong buffer.
Is it possible to do this within one eDMA stream without stopping reception? Are there any examples of similar packaging?

Thanks in advance.

Tags (4)
0 Kudos
Reply
1 Solution
1,740 Views
Sandroom
Contributor III

I figured out the problem.
I had to change the function SAI_TransferReceiveLoopEDMA() a little, called it SAI_TransferReceiveLoopEDMASetuped().
If someone encounters a similar problem, I am attaching a file with the source code of the modified function and its application.

View solution in original post

0 Kudos
Reply
1 Reply
1,741 Views
Sandroom
Contributor III

I figured out the problem.
I had to change the function SAI_TransferReceiveLoopEDMA() a little, called it SAI_TransferReceiveLoopEDMASetuped().
If someone encounters a similar problem, I am attaching a file with the source code of the modified function and its application.

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1991978%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EeDMA%20ping-pong%20buffer%20sorting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1991978%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EGood%20day%20to%20all!%3CBR%20%2F%3EI%20use%20IMX8ULPIEC%20processor%20and%20i%26nbsp%3B%3CSPAN%3Eprogramming%20SAI%20interface%20under%20m-33%20core.%3CBR%20%2F%3EI%20receive%20data%20in%20the%20format%20ABC_ABC_ABC_ABC...%20via%20eDma%20using%20the%20%3CSTRONG%3E%3CEM%3ESAI_TransferReceiveLoopEDMA()%3C%2FEM%3E%3C%2FSTRONG%3E%20function%20and%20thus%20receive%20a%20ping-pong%20buffer%20for%20two%20arrays%20storing%20ABCABCABC%20alternately.%3CBR%20%2F%3EHowever%2C%20I%20would%20like%20the%20data%20after%20reception%20to%20look%20like%20this%3A%20AAAA......BBBB......CCCC...(end)%20and%20also%20issued%20alternately%20in%20two%20buffers%20as%20in%20the%20ping-pong%20buffer.%3CBR%20%2F%3EIs%20it%20possible%20to%20do%20this%20within%20one%20eDMA%20stream%20without%20stopping%20reception%3F%20Are%20there%20any%20examples%20of%20similar%20packaging%3F%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EThanks%20in%20advance.%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1991978%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3Ei.MX%208%20Family%20%7C%20i.MX%208QuadMax%20(8QM)%20%7C%208QuadPlus%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ei.MX8ULP%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1994639%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20eDMA%20ping-pong%20buffer%20sorting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1994639%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20figured%20out%20the%20problem.%3CBR%20%2F%3EI%20had%20to%20change%20the%20function%20%3CSTRONG%3ESAI_TransferReceiveLoopEDMA()%3C%2FSTRONG%3E%20a%20little%2C%20called%20it%20%3CSTRONG%3ESAI_TransferReceiveLoopEDMASetuped()%3C%2FSTRONG%3E.%3CBR%20%2F%3EIf%20someone%20encounters%20a%20similar%20problem%2C%20I%20am%20attaching%20a%20file%20with%20the%20source%20code%20of%20the%20modified%20function%20and%20its%20application.%3C%2FP%3E%3C%2FLINGO-BODY%3E