Cannot connect to LinkServer

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot connect to LinkServer

188 Views
Contributor I

MCUXpressoIDE 11.1.1_3241 under Windows 10, 64-bit.

Often after waking up the PC from sleep / low power mode I cannot connect to my debugging probe (CMSIS-DAP).

It takes a while before it fails with a SocketException error:

Connection reset

Connection reset
      at java.net.SocketInputStream.read(SocketInputStream.java:210)
      at java.net.SocketInputStream.read(SocketInputStream.java:141)
      at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
      at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
      at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
      at sun.nio.cs.StreamDecoder.read0(StreamDecoder.java:127)
      at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:112)
      at java.io.InputStreamReader.read(InputStreamReader.java:168)
      at com.nxp.mcuxpresso.core.debug.support.linkserver.redlink.client.RedlinkServerClient.receive(RedlinkServerClient.java:928)
      at com.nxp.mcuxpresso.core.debug.support.linkserver.redlink.client.RedlinkServerClient.sendReceive(RedlinkServerClient.java:1031)
      at com.nxp.mcuxpresso.core.debug.support.linkserver.redlink.client.RedlinkServerClient.sendReceive(RedlinkServerClient.java:1016)
      at com.nxp.mcuxpresso.core.debug.support.linkserver.redlink.client.RedlinkServerClient.sendReceive(RedlinkServerClient.java:1003)
      at com.nxp.mcuxpresso.core.debug.support.linkserver.redlink.client.RedlinkServerClient.probeList(RedlinkServerClient.java:913)
      at com.nxp.mcuxpresso.core.debug.support.linkserver.emulators.common.RedlinkServerEmuHandler.discoverEmulators(RedlinkServerEmuHandler.java:197)
      at com.nxp.mcuxpresso.core.debug.support.linkserver.emulators.win.AbstractWinServerProbe.discoverEmulators(AbstractWinServerProbe.java:72)
      at com.nxp.mcuxpresso.core.debug.support.linkserver.emulators.EmulatorsDB.getEmus(EmulatorsDB.java:255)
      at com.nxp.mcuxpresso.core.debug.support.linkserver.emulators.EmulatorsDB.getEmulatorInfo(EmulatorsDB.java:195)
      at com.nxp.mcuxpresso.core.debug.support.linkserver.emulators.EmulatorsDB.getAvailableEmulators(EmulatorsDB.java:127)
      at com.nxp.mcuxpresso.core.debug.support.linkserver.emulators.TargetDiscovery.probeDiscovery(TargetDiscovery.java:553)
      at com.nxp.mcuxpresso.core.debug.support.linkserver.emulators.TargetDiscovery.probeDiscovery(TargetDiscovery.java:504)
      at com.nxp.mcuxpresso.core.debug.support.linkserver.launch.LaunchScriptUtils.getEmulatorInfo(LaunchScriptUtils.java:247)
      at com.nxp.mcuxpresso.core.debug.support.linkserver.launch.LaunchScriptUtils.init(LaunchScriptUtils.java:488)
      at com.nxp.mcuxpresso.core.debug.support.linkserver.launch.LaunchScriptUtils.<init>(LaunchScriptUtils.java:156)
      at com.nxp.mcuxpresso.core.debug.support.linkserver.launch.LaunchScriptUtils.<init>(LaunchScriptUtils.java:143)
      at com.nxp.mcuxpresso.core.debug.support.linkserver.services.TargetDiscoveryService.getTargetDiscovery(TargetDiscoveryService.java:138)
      at com.nxp.mcuxpresso.core.debug.support.linkserver.override.LSFinalLaunchSequence$TargetDiscoveryJob.run(LSFinalLaunchSequence.java:110)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

The only way I seem to be able to get it running again is by uninstalling MCUXpresso and the related drivers and then reinstalling everything again.

0 Kudos
8 Replies

10 Views
NXP TechSupport
NXP TechSupport

Hello petersteinberg‌,

Which board/debugger are you using? This happens also with other debuggers?

 

Best Regards,

Alexis Andalon

0 Kudos

10 Views
Contributor I

This happens with the various Kinetis Freedom boards I have configured as emulators, both FRDM-KL27 and FRDM-K22.

The boards properly show up in Windows as

WebUSB: CMSIS-DAP

USB Serial Device (COMx)

MBED VFS USB Device

The details.txt file shows:

  1. DAPLink Firmware - see https://mbed.com/daplink

Unique ID: 0231000030514e45001920067d7e00291f91000097969900

HIC ID: 97969900

Auto Reset: 0

Automation allowed: 0

Overflow detection: 0

Daplink Mode: Interface

Interface Version: 0253

Bootloader Version: 0244

Git SHA: 64359f5c786363065a41ec15c348e3d53568da03

Local Mods: 0

USB Interfaces: MSD, CDC, HID, WebUSB

Bootloader CRC: 0xbd0abee1

Interface CRC: 0x9027c7dd

Remount count: 0

URL: https://mbed.org/device/?code=@U?version=@V?target_id=@T

The old PE Multilink Universal device that I have works properly.

The Freedom boards worked properly previously on this PC; they appear to have just ceased to connect overnight.

0 Kudos

10 Views
NXP TechSupport
NXP TechSupport

Hello petersteinberg‌,

 

Have you tried updating the firmware bootloader? Sometimes the bootloader get corrupted and is not possible to flash the MCU anymore. Here´s the link to download the OpenSDA:

OpenSDA Serial and Debug Adapter | NXP 

Let me know if this helps you.

Best Regards,

Alexis Andalon

0 Kudos

10 Views
Contributor I

I have tried that on a couple of Freedom boards and all it’s done is brick them.

I’ve been unable to reflash the bootloader with the PE Multilink pod but it appears unable to reflash the bootloader on the K20.

0 Kudos

10 Views
Contributor I

I flashed a KL27 freedom board with the Segger image (14_OpenSDA_FRDM-KL27Z.bin) and it connected and programmed the devices properly.

I then flashed the same board with the MBED image (0253_k20dx_frdmkl27z_0x8000.bin) and it could not connect.

0 Kudos

10 Views
NXP TechSupport
NXP TechSupport

Hello petersteinberg‌,

In the link from my previous message is the OpenSDA firmware we recommend, in the case you want to use the MBED firmware I will suggest to contact them if this doesn't work in your board.

Best Regards,

Alexis Andalon

0 Kudos

10 Views
Contributor I

Reflashed the board with that OpenSDA file (k20dx_frdmkl27z_if_crc.bin) and still get the same error.

Same behavior on a Freedom K22 board.

The Segger image (01_OpenSDA_FRDM-K22F.bin) works.

The NXP image from that link (k20dx_frdmk22f_if_crc_legacy_0x8000.bin) does not.

0 Kudos

10 Views
NXP TechSupport
NXP TechSupport

Hello petersteinberg‌,

It looks like that in the new MCUXpresso there's a problem with the PE OpenSDA firmware, this issue is already reported so meanwhile please use the Segger firmware. I will let you know if there's a workaround for this issue.

Sorry for the inconvenience this may cause you.

Best Regards,

Alexis Andalon

0 Kudos