LPUART DMA + IDLE Interrupt isue

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

LPUART DMA + IDLE Interrupt isue

1,040件の閲覧回数
kalvin
Contributor I

Now I have another problem, this is my modified demo implementation of LPUART DMA + IDLE Interrupt, the following is the problem:

kalvin_0-1668755090540.png

 

 

0 件の賞賛
6 返答(返信)

1,019件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

which demo do you refer to? If DMA is updating your buffer with less bytes comparing previous transfer, a not overwritten bytes will be kept. You can clear buffer after reading it.

BR, Petr  

0 件の賞賛

996件の閲覧回数
kalvin
Contributor I

hi Peter,

I just send you a private message, please check your message box.

0 件の賞賛

977件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

I read that, but not sure what is the intention, rather send full project and describe desired functionality and present behavior (what is sent, received and what is desired result).

BR, Petr

0 件の賞賛

951件の閲覧回数
kalvin
Contributor I

Hi Peter,

How's it going now that I sent you a private message the other day 

0 件の賞賛

973件の閲覧回数
kalvin
Contributor I

Hi Peter,

Please check the private message.

0 件の賞賛

1,017件の閲覧回数
kalvin
Contributor I

I don't know where to clear the rx buffer.

Reference:

/* Handle idle line interrupt */
if (LPUART_GetIntMode(base, LPUART_INT_IDLE_LINE))
{
if (LPUART_GetStatusFlag(base, LPUART_IDLE_LINE_DETECT))
{
lpuart_state_t * lpuartState = (lpuart_state_t *)s_lpuartStatePtr[instance];
lpuartState->rxCallback(lpuartState, UART_EVENT_RX_FULL, lpuartState->rxCallbackParam);
if (lpuartState->rxSize > 0U)
{
/* Set the source address and the number of minor loops (bytes to be transfered) */
EDMA_DRV_SetDestAddr(lpuartState->rxDMAChannel, (uint32_t)(lpuartState->rxBuff));
EDMA_DRV_SetMajorLoopIterationCount(lpuartState->rxDMAChannel, lpuartState->rxSize);

/* Now that this rx is set up, clear remaining bytes count */
lpuartState->rxSize = 0U;

/* Re-start the channel */
(void)EDMA_DRV_StartChannel(lpuartState->rxDMAChannel);
}
else
{
/* Stop the reception */
LPUART_DRV_StopRxDma(instance);

/* Invoke the callback to notify the end of the transfer */
if (lpuartState->rxCallback != NULL)
{
lpuartState->rxCallback(lpuartState, UART_EVENT_END_TRANSFER, lpuartState->rxCallbackParam);
}

/* Clear the flags */
LPUART_DRV_ClearErrorFlags(base);
}
LPUART_ClearStatusFlag(base, LPUART_IDLE_LINE_DETECT);
}
}

0 件の賞賛