DMA GetRemainingBytes bug report

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

DMA GetRemainingBytes bug report

1,322 Views
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;
Tags (3)
0 Kudos
Reply
1 Reply

1,072 Views
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 Kudos
Reply