Cannot connect to iMXRT1064 after executing _WFI();

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Cannot connect to iMXRT1064 after executing _WFI();

Jump to solution
2,293 Views
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

Tags (2)
0 Kudos
1 Solution
1,150 Views
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

View solution in original post

3 Replies
1,143 Views
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 Kudos
1,138 Views
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,151 Views
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