RT1021 Use the sample program 'edma_rb_transfer',EDMA_GetRemainingMajorLoopCount() return 0

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

RT1021 Use the sample program 'edma_rb_transfer',EDMA_GetRemainingMajorLoopCount() return 0

1,367 次查看
jzhou
Contributor I

Use the sample program 'edma_rb_transfer'  EXAMPLE_LPUART_IRQHandler().

  • The emergence of probability EDMA_GetRemainingMajorLoopCount() return 0,

    • Data receiving is abnormal.

    •  
    • What are the reasons that cause it to return 0? How can you avoid this problem?
    • The problem is probabilistic.

    •  
    •  

      • void EXAMPLE_LPUART_IRQHandler(void)
        {
            uint32_t status            = LPUART_GetStatusFlags(EXAMPLE_LPUART);
            uint32_t enabledInterrupts = LPUART_GetEnabledInterrupts(EXAMPLE_LPUART);
         portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
            /* If new data arrived. */
            if ((0U != ((uint32_t)kLPUART_IdleLineFlag & status)) &&
                (0U != ((uint32_t)kLPUART_IdleLineInterruptEnable & enabledInterrupts)))
            {
                (void)LPUART_ClearStatusFlags(EXAMPLE_LPUART, kLPUART_IdleLineFlag);
                isIdleLineDetected = true;
                receivedBytes      = EXAMPLE_RING_BUFFER_SIZE -
                                EDMA_GetRemainingMajorLoopCount(EXAMPLE_LPUART_DMA_BASEADDR, LPUART_RX_DMA_CHANNEL);
                receivedBytes += (EXAMPLE_RING_BUFFER_SIZE * ringBufferFlag) - ringBufferIndex;

          EXAMPLE_ReadRingBuffer(g_ringBuffer, g_rxBuffer, receivedBytes);

                if (receivedBytes > 32U)
                {
                    __NOP();
                }
            }
            LPUART_TransferEdmaHandleIRQ(EXAMPLE_LPUART, &g_lpuartEdmaHandle);
            SDK_ISR_EXIT_BARRIER;
        }

       

    •  

0 项奖励
回复
4 回复数

1,032 次查看
pierre_denis
Contributor II

Hello Pavel,

Any update on this issue? We are also concerned.

Thank you in advance.

Regards

0 项奖励
回复

1,300 次查看
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, sorry for the late response, I review the information and I see what you mentioned, I did a report about your comment to the SDK. 

Best regards,
Pavel

0 项奖励
回复

1,348 次查看
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, my name is Pavel, and I will be supporting your case, let me get into your case and when I have more information, I will contact you.

Best regards,
Pavel

0 项奖励
回复

1,315 次查看
jzhou
Contributor I

@Pavel_Hernandez 

Hi, Pavel

  • Thank you for your reply. Is there any progress on this issue?

  •