Hi Dear Authorized,
I am just trying to calculate received byte in default SDK examples (LPUART EDMA Ring Buffer). It is calculated in below code.
void EXAMPLE_LPUART_IRQHandler(void)
{
uint32_t status = LPUART_GetStatusFlags(EXAMPLE_LPUART);
uint32_t enabledInterrupts = LPUART_GetEnabledInterrupts(EXAMPLE_LPUART);
/* 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;
if (receivedBytes > 32U)
{
__NOP();
}
}
LPUART_TransferEdmaHandleIRQ(EXAMPLE_LPUART, &g_lpuartEdmaHandle);
SDK_ISR_EXIT_BARRIER;
}
But I just want to calculate it in "EXAMPLE_RxEDMACallback" because of there is no overload of EXAMPLE_LPUART_IRQHandler. I can not pass my own struct parameters to EXAMPLE_LPUART_IRQHandler.
Thanks and Regards.