jlink-edu on linux resets when trying to set the serial port above 230400

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • jlink-edu on linux resets when trying to set the serial port above 230400

    I have a number of nrf51 developers kits, they will all happily run the serial port up to about 1mbps.

    However, the jlink-edu I'm using (for the level shifters) with a 1.8V board can't go beyond 230400.

    I am using SEGGER J-Link GDB Server V5.00d with JLinkARM.dll V5.00d (DLL compiled Jun 17 2015 22:38:54).

    When I connect to the serial port at 460800 the red light on the jlink blinks and it appears that the jlink has crashed.

    At the same time the JLinkGDBServer fails:

    Source Code

    1. ERROR: Communication timed out: Requested 4 bytes, received 0 bytes !
    2. ERROR: Can not read register 15 (R15) while CPU is running
    3. ...Target halted (PC = 0x00000000)
    4. Reading all registers
    5. WARNING: Failed to read memory @ address 0x00000000


    and dmesg reports:

    Source Code

    1. [1354321.002319] usb 8-1: USB disconnect, device number 30
    2. [1354321.004490] cdc_acm 8-1:1.0: failed to set dtr/rts
    3. [1354321.314381] usb 8-1: new full-speed USB device number 31 using uhci_hcd
    4. [1354321.481559] usb 8-1: New USB device found, idVendor=1366, idProduct=0105
    5. [1354321.481566] usb 8-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    6. [1354321.481570] usb 8-1: Product: J-Link
    7. [1354321.481573] usb 8-1: Manufacturer: SEGGER
    8. [1354321.481576] usb 8-1: SerialNumber: xxx
    9. [1354321.489664] cdc_acm 8-1:1.0: ttyACM1: USB ACM device


    This works:

    Source Code

    1. picocom -b 230400 --imap lfcrlf --omap crlf /dev/ttyACM1


    this fails:

    Source Code

    1. picocom -b 460800 --imap lfcrlf --omap crlf /dev/ttyACM1


    No bytes needs to be received, it is failing on initialization.

    This is not an issue unique to 5.00, it has been happening for quite a while:
    nRF51822 Linux Driver
  • I updated to jlink-5.1.2-1.x86_64.rpm and tried again.

    This time I noticed that if the timing is right, picocom actually received ~64 bytes before failing.

    I tried to catch the exact number of bytes received (one packet or more then one) using strace, but didn't manage to catch it receiving data again.

    The device produces very little output and having it output continuously didn't help.

    Not overly interesting, in the normal case, strace doesn't show anything interesting:

    1435989241.916341 write(1, "Terminal ready\r\n", 16) = 16
    1435989241.916420 select(4, [0 3], [], NULL, NULL) = 1 (in [3])
    1435989242.152560 read(3, "", 1) = 0
    1435989242.152616 ioctl(0, TCFLSH, 0x2) = 0
    1435989242.152669 ioctl(0, SNDCTL_TMR_CONTINUE or TCSETSF, {c_iflags=0x6d02, c_oflags=0x5, c_cflags=0x4bf, c_lflags=0x8a3b, c_line=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x01\xff\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
    1435989242.152728 write(1, "\r\nFATAL: ", 9) = 9
    1435989242.152776 write(1, "term closed", 11) = 11
    1435989242.152819 write(1, "\r\n", 2) = 2