IMXRT1024 LPUART TransferNonBlocking vs eDMA Interrupt Amount Comparision

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

IMXRT1024 LPUART TransferNonBlocking vs eDMA Interrupt Amount Comparision

跳至解决方案
1,312 次查看
Lukas_Frank
Senior Contributor I

Hi Dear Authorized,

 

I am on the way to establish my software architecture to use LPUART in my project. I just want to select better performance based way. I am debugging into the "lpuart_interrupt_transfer.c " default SDK example. Aim of this debug is monitoring how many interrupt occurs when I transmit or receive my datas. I added below codes to default SDK example of "lpuart_interrupt_transfer.c"

#define DEMO_LPUART_IRQn       LPUART1_IRQn
#define DEMO_LPUART_IRQHandler LPUART1_IRQHandler

uint32_t IRQ_Count = 0;
void DEMO_LPUART_IRQHandler(void)
{
    IRQ_Count++;
    SDK_ISR_EXIT_BARRIER;
}

 

My trial is monitor how many interrupt occur while sending default data string below:

uint8_t g_tipString[] =
    "Lpuart interrupt example\r\nBoard receives 8 characters then sends them out\r\nNow please input:\r\n";

 

For example I put breakpoint to below line :

    LPUART_TransferSendNonBlocking(DEMO_LPUART, &g_lpuartHandle, &xfer);

 After above line works I am looking for how many interrupt occured for this process. But code stucking in IRQ_Handler.

 

I know ECHO SIZE is 8. But I just want to learn, how many interrupt is occuring while TransferNonBlocking operations. Could you please help me?

 

Q1:We have 4 words of RX TX FIFO buffer. Will my code exposed to interrupt for every 4 words in TransferNonBlocking usage ?

Q2:Which one of methods(TransferNonBlocking vs eDMA) do you suggest to use?

 

Thanks and Regards.

 

 

 

0 项奖励
回复
1 解答
1,286 次查看
Lukas_Frank
Senior Contributor I

Thank you Dear @FelipeGarcia . I expect IRQ handler would be in main code side and didn't see IRQ Handler in fsl_lpuart.c. I will be focus you recommendation.

Best Regards.

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,290 次查看
FelipeGarcia
NXP Employee
NXP Employee

Hi Lukas,

Your implementation is not correct because you are declaring IRQ handler twice. In lpuart_interrupt_transfer example IRQ is already in use so you should not add the code you included. If you want to count how many times it is entering the interrupt you could add the counter in the LPUART_TransferHandleIRQ in fsl_lpuart.c

Have a great day,

Felipe

-------------------------------------------------------------------------------

Note:

- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored. Please open a new thread and refer to the closed one, if you have a related question at a later point in time. 

------------------------------------------------------------------------------ 

1,287 次查看
Lukas_Frank
Senior Contributor I

Thank you Dear @FelipeGarcia . I expect IRQ handler would be in main code side and didn't see IRQ Handler in fsl_lpuart.c. I will be focus you recommendation.

Best Regards.

0 项奖励
回复