iMXRT1064 uart interrupt stops resuming from breakpoint

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

iMXRT1064 uart interrupt stops resuming from breakpoint

1,075 次查看
anujtanksali
Contributor II

Hello,

I am facing an peculiar issue related to debug. Am using iMXRT1064 device and debugging my code through PE Micro.

Am using a uart interrupt where i received bytes. When i put break point in application code the break point hits. when i continue the program the uart interrupt stops and am not able to receive any bytes. 

this happens only if any break point is hit and i continue the program. Am using MCUXpresso 11.1 and SDK 2.7.0

This happens only for uart interrupt. Other interrupts work fine even after resuming from debug breakpoint.

Thanks

Regards,

Anuj

标签 (1)
标记 (1)
0 项奖励
6 回复数

942 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Anuj Tanksali ,

 

Where you put the breakpoint?

 I have tested the SDK2.7.0 evkmimxrt1064_lpuart_interrupt_transfer on my side, but I am using the CMSIS DAP debugger, please check my test result:

pastedImage_1.png

remove the breakpoint, you can find I still can receive the uart data:

pastedImage_2.png

  So, please tell me your breakpoint code line number, then I do more testing with P&E multilink, at least, the CMSIS DAP has no problem on my side, my test platform is the MIMXRT1064-EVK board.

Any updated information, please kindly let me know.

Kerry

 

-------------------------------------------------------------------------------
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.
-------------------------------------------------------------------------------

0 项奖励

942 次查看
anujtanksali
Contributor II

Hi kerryzhou‌,

Thank you for your reply.

I am testing on my prototype board and code is different than EVK example. Am using PE micro debugger. Can you please check with PE micro universal debugger and let me know.

Thanks

Regards

Anuj

0 项奖励

942 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Anuj Tanksali,

  Today, I have tested the MIMXRT106x-EVK board with P&E Multilink debugger, totally the same result as CMSIS DAP. The breakpoint still works.

  My IDE is MCUXpresso IDE v11.1.0 [Build 3209] [2019-12-12].

Kerry

 

-------------------------------------------------------------------------------
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.
-------------------------------------------------------------------------------

0 项奖励

942 次查看
anujtanksali
Contributor II

Hi kerryzhou‌,

Thank you for your reply.

Can you tell me if any UART registers are needed to be cleared as in my interrupt routine i don't see any register flags cleared.

This issue may be because of this?

Regards,

Anuj

0 项奖励

942 次查看
anujtanksali
Contributor II

Hi kerryzhou‌,

I found the issue. I had not cleared the overrun and parity flags in the rx interrupt. due to break point these flags were being set.

The interrupt works now even with breakpoints.

Regards,

Anuj

0 项奖励

942 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Anuj Tanksali,

   Thanks for your updated information, and the solution sharing.

   The overrun need to be cleared.

/* If RX overrun. */
if ((uint32_t)kLPUART_RxOverrunFlag == ((uint32_t)kLPUART_RxOverrunFlag & status))
{
/* Clear overrun flag, otherwise the RX does not work. */
base->STAT = ((base->STAT & 0x3FE00000U) | LPUART_STAT_OR_MASK);

/* Trigger callback. */
if (NULL != (handle->callback))
{
handle->callback(base, handle, kStatus_LPUART_RxHardwareOverrun, handle->userData);
}
}

If you have any other question in the future, welcome to create the new question post, thanks.

Kerry

 

-------------------------------------------------------------------------------
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.
-------------------------------------------------------------------------------

0 项奖励