Kinetis K28F MCUXpresso Debug Problem

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

Kinetis K28F MCUXpresso Debug Problem

650 Views
sekartal
Contributor I

Hello, I am working on a custom board that has Kinetis K28F (MK28FN2M0AVMI15) on it. The platform that we are developing software is MCUXpresso IDE V11.0.1.We are at the beginning of the software development process; therefore, we are still trying to use SDK examples provided for the FRDM-K28F development board as a template. It was working fine that we could successfully verify our boards by using PEMicro Multilink but we could not program the flash by using GUI Flash Tool. I thought it is because the oscillator frequencies of our board and the FRDM board are different and I modified the clock settings of the SDK 2.6 Led Blinky example. I changed the oscillator frequency to 24Mhz and the mode to HighGainMode inside the clock_config.c file. I also added an oscillator feedback resistor to my board. Then I could program my board and observe the oscillator output by scope. It was good until here but then I can no longer connect to the board. When I try to debug them in MCUXpresso I get the messsage "An error occured while connecting to the interface hardware or target specified in the Launch Configuration Dialog. For this launch, you may retry/re-specify the connection with the following parameters:" I can still successfully connect and debug my other boards whose flash is not programmed yet. Do you have any suggestions about this issue?

2 Replies

511 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi savas,

Please refer: How To Sucessfully Program a Custom made Kinetis Microcontroller Board.(If this doesn't work, then please try to use the P&E recovery utility mentioned in Bricking and Recovering FRDM-KL25Z Boards: Reset, SWD Clock and Low Power.)

Check the hardware circuit of your custom board.

Since you are using the MCUXpresso IDE, step8 be replaced by resurrect locked Kinetis device in GUI Flash Tool.

 

GUI Flash Tool extended for P&E and SEGGER

The GUI Flash Tool previously was only for the LinkServer (or LPC-Link2) connections.

GUI Flash Tool

GUI Flash Tool

Now it supports all debug probe connections, including P&E and SEGGER, and I can program, erase or even resurrect a ‘bricked’ Kinetis device:

linkserver-gui-flash-tool.png

LinkServer GUI Flash Tool

PEMicro GUI Flash Tool

PEMicro GUI Flash Tool

Segger GUI Flash Tool

Segger GUI Flash Tool

Using the toolbar icon is probably the most convenient way to use the GUI Flash Programmer, it is possible to run it from the debugger launch configuration too:

Running GUI Flash Programmer from Launch Configuration

Running GUI Flash Programmer from Launch Configuration

The operation executed is logged in the Console View:

GUI Flash Tool Console Output

GUI Flash Tool Console Output

Best Regards,

Robin

 

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

511 Views
sekartal
Contributor I

Hello Robin,

Thank you for your detailed answer. I couldn't use the Recovery Tool but I found my solution in the comments of Erich's post. I pulled NMI pin to low before boot up and I could successfully erase the flash by using GUI Flash Tool. Then, I could debug it with our test code.

0 Kudos