DMA GetRemainingBytes bug report

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

DMA GetRemainingBytes bug report

1,028件の閲覧回数
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 返信

778件の閲覧回数
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 件の賞賛