FRDM-KL46Z PEMicro an error occured while connecting to the interface hardware after UART code?

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

FRDM-KL46Z PEMicro an error occured while connecting to the interface hardware after UART code?

Jump to solution
2,658 Views
fmontanari
Contributor I

Hi everyone, I have a FRDM-KL46Z board that I'm using for a college project. The thing is, I've been trying to setup UART functionality and tried a few of the SDK examples (which worked).

When I tried to write my own program and run it, the board suddenly stopped responding, and after trying to debug again I see this error message:

fmontanari_0-1654305161006.png

The thing is, I've searched for this issue and already updated the firmware but the issue still remains. I also tried with two computers where this board worked before and I'm getting the same error.

  • Bootloader Version: 1.11
  • App Version: 1.18

Could this be an issue with the UART configuration still messing with the OpenSDA ? Is the program still running even though I updated the firmware?

For reference, what I did to update the firmware was:

  1. Start the board in BOOTLOADER mode by holding the switch next to the USB port.
  2. Download the P&E Micro bootloader files from their site (listed in the SDA_INFO file)
  3. Drag & drop the SDA file corresponding to this board (MSD-DEBUG-FRDM-KL46Z48M_Pemicro_v118.SDA)
  4. Unplug and plug the USB cable from my PC (without pressing the switch).

The MSD is being recognized (not in bootloader mode) AND when trying to upload the board is recognized as a P&E Micro probe, but then the error above mentioned appears.

Hopefully I haven't bricked my board... Thanks in advance.

0 Kudos
Reply
1 Solution
2,552 Views
Robin_Shen
NXP TechSupport
NXP TechSupport
0 Kudos
Reply
11 Replies
2,643 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi fmontanari,

Please refer the answer in: "MK60DX256VLL10" RESET PIN
Make sure the OpenSDA is in firmware application mode instead of bootloader mode.
Check if the MCU is resetting by measure the waveform of RST_K20D50_B(J3.6).
Pullup the NMI pin by J1.10.

Best Regards,
Robin
-------------------------------------------------------------------------------
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 Kudos
Reply
2,638 Views
fmontanari
Contributor I

Hi Robin_Shen, according to the RST_K20D50_B pin, it seems that it is trying to reset:

fmontanari_0-1654529445039.png

The NMI is being pulled up with a 10K resistor.

I don't have a P&E micro probe to use the Kinetis Recovery Utility, is that the only alternative? The only thing I have is a TTL-USB converter.

0 Kudos
Reply
2,629 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Have you tried to use the onboard P&E Micro OpenSDA with Kinetis Recovery Utility?

If you have Segger J-Link, please refer: Communication error while accessing MDM-AP.

0 Kudos
Reply
2,623 Views
fmontanari
Contributor I

I've tried powercycling the board a few times, but haven't got a success message. I'm not sure though how much should I wait before plugging/unplugging the board. (attaching image for reference)

fmontanari_0-1654562524934.png

Should I wait until the MSD is recognized by the OS? Or try multiple times before the OS gets a chance of doing so?

I don't have a Segger J-Link, when I mentioned a USB-TTL converter I was referring to something like this: 

fmontanari_1-1654562603479.jpeg

(Based on a CH340 chip, which I assume isn't going to work as is, but it might be useful information). 

0 Kudos
Reply
2,620 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Sorry for forgetting to mention, it's better to powercycling the MCU by J17 instead left the OpenSDA always powered.(You need to modify the hardware)

J17 FRDM-KL46Z.png

Sorry USB-TTL converter can't help.

0 Kudos
Reply
2,586 Views
fmontanari
Contributor I

Hi Robin, I've finally managed to get my hands on a soldering station and remove those SMD resistors. I've soldered the jumper J17 and used the P&E Kinetis Recovery Utility as you mentioned, and the halting succeeded (at the first try, which makes me think there's something fishy there). Here's a screenshot of the success message:

fmontanari_0-1655416835347.png

However, when I try to upload new code, I still get the error message:

fmontanari_1-1655417042437.png

Just to recap, here's the steps I did:

  1. Desolder the resistors and cutting the trace marked in the previous answer, replacing it with a jumper.
  2. Connect the FRDM-KL46Z to my computer via OpenSDA USB
  3. Open the Kinetis Recovery Utility, selecting OpenSDA, and pressing "START"
  4. Remove the jumper J17 and placing it again. I get the message stated in the first image of this post.
  5. Close Kinetis Recovery Utility (otherwise MCUXpresso doesn't recognize the probe as it's in use).
  6. In a "hello world" project in MCUXpresso, debug the program by using P&E Micro Probe.

Should I use an alternative mean to upload the new code while the processor is halted (ie, without closing Kinetis Recovery Utility)?

(Thanks for all the help so far, by the way).

0 Kudos
Reply
2,576 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Check if Flash_Config is modified, here is the default value with unsecured. 

Flash_Config.png

Have you select the option 'Emergency Kinetis Device Recovery by Full Chip Erase'?

After close Kinetis Recovery Utility, maybe you can try to use MSD Flash Programmer of OpenSDA.

1.2.3 MSD Flash Programmer.png

 

0 Kudos
Reply
2,569 Views
fmontanari
Contributor I

Flash_Config isn't modified, and I did try using 'Emergency Kinetis Device Recovery by Full Chip Erase'.

I will try the MSD programmer, but just to be sure, the files I should upload would be the .axf and .map files in the /Debug folder, right? (Here's a screenshot of the files I'd drag and drop from a clean "hello world" project).

fmontanari_0-1655589811173.png

I'll try it as soon as you give me the OK. Thanks for everything!

0 Kudos
Reply
2,553 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Please generate binary file by refer: MCUXpresso IDE: S-Record, Intel Hex and Binary Files

Binary Utilities.png

0 Kudos
Reply
2,541 Views
fmontanari
Contributor I

Uploading a bin file with the MSD programmer was the solution. Now I'm able to debug and upload new code with MCUXpresso.

Thanks for all your patience Robin! You saved my board!

0 Kudos
Reply
2,538 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

You are welcome! I am glad to hear that it works now.

0 Kudos
Reply