[M487] Fix PDMA error on timeout

pull/4608/head
ccli8 2017-03-07 17:48:37 +08:00
parent 0c574f6a98
commit ae33f9eed7
1 changed files with 1 additions and 1 deletions

View File

@ -158,7 +158,7 @@ static void pdma_vec(void)
PDMA->INTSTS = reqto; PDMA->INTSTS = reqto;
while (reqto) { while (reqto) {
int chn_id = nu_ctz(reqto) >> PDMA_INTSTS_REQTOF0_Pos; int chn_id = nu_ctz(reqto) - PDMA_INTSTS_REQTOF0_Pos;
if (dma_chn_mask & (1 << chn_id)) { if (dma_chn_mask & (1 << chn_id)) {
struct nu_dma_chn_s *dma_chn = dma_chn_arr + chn_id; struct nu_dma_chn_s *dma_chn = dma_chn_arr + chn_id;
if (dma_chn->handler && (dma_chn->event & DMA_EVENT_TIMEOUT)) { if (dma_chn->handler && (dma_chn->event & DMA_EVENT_TIMEOUT)) {