Dma transfer on S32K310

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Dma transfer on S32K310

跳至解决方案
1,895 次查看
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 项奖励
回复
1 解答
1,863 次查看
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

在原帖中查看解决方案

2 回复数
1,864 次查看
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,852 次查看
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%3ES32K310%E4%B8%8A%E7%9A%84DMA%E4%BC%A0%E8%BE%93%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1938347%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E5%BD%93%E6%88%91%E5%9C%A8%20S32K310%20%E4%B8%8A%E6%B5%8B%E8%AF%95%20Dma%20%E5%8A%9F%E8%83%BD%E6%97%B6%EF%BC%8C%E6%88%91%E5%8F%91%E7%8E%B0%E7%9B%AE%E6%A0%87%E7%BC%93%E5%86%B2%E5%8C%BA%E6%B2%A1%E6%9C%89%E6%9B%B4%E6%96%B0%E3%80%82%E7%84%B6%E5%90%8E%E5%B0%9D%E8%AF%95%E8%AF%BB%E5%8F%96Dma%E7%8A%B6%E6%80%81%EF%BC%8C%E8%BF%99%E6%98%AF%E9%94%99%E8%AF%AF%E5%AF%84%E5%AD%98%E5%99%A8%E7%9A%84%E5%80%BC%E3%80%82%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%3E%E8%BF%99%E5%B0%B1%E6%98%AF%E5%8F%98%E9%87%8F%E5%88%9D%E5%A7%8B%E5%8C%96%E7%9A%84%E6%96%B9%E5%BC%8F%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%3E%E5%9B%9E%E5%A4%8D%EF%BC%9AS32K310%E4%B8%8A%E7%9A%84DMA%E4%BC%A0%E8%BE%93%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1939100%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E8%B0%A2%E8%B0%A2%EF%BC%8C%E5%BE%88%E5%A5%BD%E7%9A%84%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88%EF%BC%81%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1939096%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9AS32K310%E4%B8%8A%E7%9A%84DMA%E4%BC%A0%E8%BE%93%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%3E%E6%A0%B9%E6%8D%AE%E6%88%91%E4%B8%8E%E6%82%A8%E6%A3%80%E6%9F%A5%E7%9A%84%E8%B0%83%E8%AF%95%E4%BC%9A%E8%AF%9D%EF%BC%8C%E6%88%91%E4%BB%AC%E5%8F%AF%E4%BB%A5%E5%BE%97%E5%87%BA%E7%BB%93%E8%AE%BA%EF%BC%8C%E5%8E%9F%E5%9B%A0%E6%98%AF%EF%BC%9A%E4%B8%8D%E7%9F%A5%E4%BD%95%E6%95%85%EF%BC%8C%E5%9C%A8%E8%B0%83%E7%94%A8%20Dma_Ip_Init()%20%E5%87%BD%E6%95%B0%E4%B9%8B%E5%89%8D%E8%AE%BE%E7%BD%AE%E4%BA%86%20CH0_ES%5BERR%5D%20%E4%BD%8D%EF%BC%8C%E4%B9%8B%E5%90%8E%EF%BC%8C%E7%9B%AE%E6%A0%87%E5%9C%B0%E5%9D%80%E5%92%8C%E6%BA%90%E5%9C%B0%E5%9D%80%E6%97%A0%E6%B3%95%E9%80%9A%E8%BF%87%20Dma_Ip_SetLogicChannelTransferList()%20%E5%87%BD%E6%95%B0%E5%86%99%E5%85%A5%20DADDR%20%E5%92%8C%20SADDR%20%E5%AF%84%E5%AD%98%E5%99%A8%E3%80%82%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22fontstyle0%22%3E%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88%E6%98%AF%EF%BC%9A%E5%9C%A8%E8%B0%83%E7%94%A8Dma_Ip_Init()%E5%87%BD%E6%95%B0%E4%B9%8B%E5%89%8D%E5%86%99%E5%85%A51%E6%9D%A5%E6%B8%85%E9%99%A4CH0_ES%5BERR%5D%E4%BD%8D%E3%80%82%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22fontstyle0%22%3E%E9%A1%BA%E7%A5%9D%E5%95%86%E7%A5%BA%EF%BC%81%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