Cannot connect to iMXRT1064 after executing _WFI();

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

Cannot connect to iMXRT1064 after executing _WFI();

跳至解决方案
2,768 次查看
CarrotMan
Contributor II

The issue is reproducable by opening evkmimxrt1064_gpt_timer example under drivers->gpt and removing GETCHAR(); line in the main file. If _WFI(); is removed, the issue does not occur.

SEGGER Ultra debugger no longer can connect to the target. As a workaround, the bootmode can be changed to something else, like SD (not connected) to make the microcontroller get stuck in ROMCP when booting. Control can then be regained.

Assuming that this was done on a PCBA where there are no bootmode dipswitches, how could the control be regained and the controller reprogrammed? I was running these examples on a board we developed, and now it is pretty much bricked. It seems to me that JTAG should always be able to gain control of the processor.

So the questions are:

  1. Why does this happen?
  2. How can this be avoided?

 

Best regards,

 

CarrotMan

标记 (2)
0 项奖励
回复
1 解答
1,625 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @CarrotMan ,

  Why you use  _WFI() in your code, it will let the chip enter the low power mode, and some mode will disable the external debugger, then you can't connect it.

  When you meet this issues, you even can enter the serial download mode, and download a new code which don't have  _WFI() to recovery it.

  Wish it helps you!

If you still have questions about it, please kindly let me know.

Best Regards,

Kerry

在原帖中查看解决方案

3 回复数
1,618 次查看
CarrotMan
Contributor II

Dear Kerry,

 

Is it possible to enter Serial Download mode if I do not have access to any configuration dipswitches?

 

Best regards,

 

CarrotMan

0 项奖励
回复
1,613 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @CarrotMan 

  No, you need to switch the BOOT_MODE pin to change the mode, and do the reset or power on again.

 

Wish it helps you!

Best Regards,

Kerry

1,626 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @CarrotMan ,

  Why you use  _WFI() in your code, it will let the chip enter the low power mode, and some mode will disable the external debugger, then you can't connect it.

  When you meet this issues, you even can enter the serial download mode, and download a new code which don't have  _WFI() to recovery it.

  Wish it helps you!

If you still have questions about it, please kindly let me know.

Best Regards,

Kerry