Dma transfer on S32K310

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

Dma transfer on S32K310

Jump to solution
1,356 Views
LeoYang-
NXP Employee
NXP Employee

 while i am testing the Dma function on S32K310, i find that the destination buffer is not updated. then tried to read the Dma status, this is the value of error register.

LeoYang_0-1724320806973.png

this is how the variables initialized

LeoYang_1-1724320955411.pngLeoYang_2-1724320978675.png

 

 

0 Kudos
Reply
1 Solution
1,324 Views
DanNguyenDuy
NXP Employee
NXP Employee

Hi @LeoYang-,

As per the debug session that I checked with you, we can conclude that the cause is: somehow, the CH0_ES[ERR] bit was set before calling the Dma_Ip_Init() function, and after, the destination address and source address can't be written into the DADDR and SADDR registers by Dma_Ip_SetLogicChannelTransferList() function.

This is the solution: write 1 to clear the CH0_ES[ERR] bit before calling the Dma_Ip_Init() function.

Best regards,

Dan

View solution in original post

2 Replies
1,325 Views
DanNguyenDuy
NXP Employee
NXP Employee

Hi @LeoYang-,

As per the debug session that I checked with you, we can conclude that the cause is: somehow, the CH0_ES[ERR] bit was set before calling the Dma_Ip_Init() function, and after, the destination address and source address can't be written into the DADDR and SADDR registers by Dma_Ip_SetLogicChannelTransferList() function.

This is the solution: write 1 to clear the CH0_ES[ERR] bit before calling the Dma_Ip_Init() function.

Best regards,

Dan

1,313 Views
LeoYang-
NXP Employee
NXP Employee
thank you, good solution!
%3CLINGO-SUB%20id%3D%22lingo-sub-1938347%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EDma%20transfer%20on%20S32K310%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1938347%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%26nbsp%3Bwhile%20i%20am%20testing%20the%20Dma%20function%20on%20S32K310%2C%20i%20find%20that%20the%20destination%20buffer%20is%20not%20updated.%20then%20tried%20to%20read%20the%20Dma%20status%2C%20this%20is%20the%20value%20of%20error%20register.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22LeoYang_0-1724320806973.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22LeoYang_0-1724320806973.png%22%20style%3D%22width%3A%20140px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F294745iDAA8FB64E4D636DC%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22LeoYang_0-1724320806973.png%22%20alt%3D%22LeoYang_0-1724320806973.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3Ethis%20is%20how%20the%20variables%20initialized%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22LeoYang_1-1724320955411.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22LeoYang_1-1724320955411.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F294747iBD0D194661EBB30E%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22LeoYang_1-1724320955411.png%22%20alt%3D%22LeoYang_1-1724320955411.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22LeoYang_2-1724320978675.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22LeoYang_2-1724320978675.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F294748i496B470BCB3EDF57%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22LeoYang_2-1724320978675.png%22%20alt%3D%22LeoYang_2-1724320978675.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1939100%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Dma%20transfer%20on%20S32K310%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1939100%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Ethank%20you%2C%20good%20solution!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1939096%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Dma%20transfer%20on%20S32K310%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1939096%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F225112%22%20target%3D%22_blank%22%3E%40LeoYang-%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22fontstyle0%22%3EAs%20per%20the%20debug%20session%20that%20I%20checked%20with%20you%2C%20we%20can%20conclude%20that%20the%20cause%20is%3A%20somehow%2C%20the%26nbsp%3BCH0_ES%5BERR%5D%20bit%20was%20set%20before%20calling%20the%20Dma_Ip_Init()%20function%2C%20and%20after%2C%20the%20destination%20address%20and%20source%20address%20can't%20be%20written%20into%20the%20DADDR%20and%20SADDR%20registers%20by%20Dma_Ip_SetLogicChannelTransferList()%20function.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22fontstyle0%22%3EThis%20is%20the%20solution%3A%20write%201%20to%20clear%20the%26nbsp%3BCH0_ES%5BERR%5D%20bit%20before%20calling%20the%20Dma_Ip_Init()%20function.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22fontstyle0%22%3EBest%20regards%2C%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22fontstyle0%22%3EDan%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E