DMA GetRemainingBytes bug report

取消
显示结果 
搜索替代 
您的意思是: 

DMA GetRemainingBytes bug report

710 次查看
mstumbra
Contributor II

Hello

Bug in fsl_dma.c of LPC546xx SDK v2.2.0;

function uint32_t DMA_GetRemainingBytes(DMA_Type *base, uint32_t channel)

return statement doesn't perform masking and bit shifting as in other functions of same source file. Also "+1" performed for register value, instead of actual XFERCOUNT value.

fix:

return base->CHANNEL[channel].XFERCFG + 1;

change to

return ((base->CHANNEL[channel].XFERCFG & DMA_CHANNEL_XFERCFG_XFERCOUNT_MASK) >> DMA_CHANNEL_XFERCFG_XFERCOUNT_SHIFT) + 1;
标记 (3)
0 项奖励
1 回复

460 次查看
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Michael,

Thank you for reporting this, I have sent this report to the SDK development team.

Best Regards!
Carlos Mendoza
Technical Support Engineer

0 项奖励