NMI pin interfering with SWD debugging?

cancel
Showing results for 
Search instead for 
Did you mean: 

NMI pin interfering with SWD debugging?

288 Views
johnadamson
Contributor III

On the MKE18F, I used the NMI pin as a GPIO.  I think I've found how to configure FOPT to disable NMI, but I'm having intermittent problems getting the debugger to connect and program the chip after having programmed it with NMI enabled (since that's the MCUXpresso default) ...could this be caused by the NMI pin or should the SWD port be able to override this?  Long term, the concern is that we'll have problems programming this the first time.  

From the debug scripts, I'm getting:

Release NRESET
Reset pin state: 01
MDM-AP Control (Debug Request): 0x00000004
MDM-AP Status: 0x00000032
MDM-AP Core Halt Failed
MDM-AP Control (Debug Request): 0x00000004
MDM-AP Status: 0x00000032
MDM-AP Core Halt Failed
MDM-AP Control (Debug Request): 0x00000004
MDM-AP Status: 0x00000032
MDM-AP Core Halt Failed

and RESET is being held low, presumably by the processor.  

Reset circuit is per Figure 37, page 93 of the KE1xFP100M168SF0 data sheet.

John

Tags (3)
0 Kudos
2 Replies

108 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Maybe you can connect a external pullup resistor at this pin before FOPT are changed by first programed.
Otherwise low voltage at NMI pin before disabled this function by FOPT will cause NMI interrupt.

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

108 Views
johnadamson
Contributor III

Pulling up NMI didn't help.  

Shouldn't the SWD be able to trigger a Mass Erase function (thus reprogramming the FOPT) even if NMI is active?

At any rate, the problem seems to be with the reset circuit, disconnecting the external reset module resolved the immediate problem, I was able to connect the debugger and program the flash, I was also able to use "Linkserver GUI Flash Programmer" to do a mass erase.  NMI was not pulled up for either of these.  The question remains as to why the reset module and the debugger don't like each other, as I think I've followed the recommendations in the data sheet.  But I'll post that as a separate question.

John

0 Kudos