probe-rs: nRF91 gives me ERROR probe_rs::probe::jlink > DAP read timeout.

When I’m running cargo embed --target=thumbv8m.main-none-eabihf I get errors:

       DEBUG jaylink           > libusb 1.0.23.11397
       DEBUG jaylink           > libusb has capability API: true
       DEBUG jaylink           > libusb has HID access: false
       DEBUG jaylink           > libusb has hotplug support: true
       DEBUG jaylink           > libusb can detach kernel driver: false
       DEBUG jaylink           > open_usb: device descriptor: DeviceDescriptor {
    bLength: 0x12,
    bDescriptorType: 0x1,
    bcdUSB: 0x200,
    bDeviceClass: 0x0,
    bDeviceSubClass: 0x0,
    bDeviceProtocol: 0x0,
    bMaxPacketSize: 0x40,
    idVendor: 0x1366,
    idProduct: 0x101,
    bcdDevice: 0x100,
    iManufacturer: 0x1,
    iProduct: 0x2,
    iSerialNumber: 0x3,
    bNumConfigurations: 0x1,
}
       DEBUG jaylink           > scanning 1 interfaces
       DEBUG jaylink           > J-Link interface is #0
       DEBUG probe_rs::probe::daplink::tools > Attempting to open 1366:0101 in CMSIS-DAP v1 mode
       DEBUG probe_rs::probe::stlink::usb_interface > Acquired libusb context.
       DEBUG jaylink                                > open_usb: device descriptor: DeviceDescriptor {
    bLength: 0x12,
    bDescriptorType: 0x1,
    bcdUSB: 0x200,
    bDeviceClass: 0x0,
    bDeviceSubClass: 0x0,
    bDeviceProtocol: 0x0,
    bMaxPacketSize: 0x40,
    idVendor: 0x1366,
    idProduct: 0x101,
    bcdDevice: 0x100,
    iManufacturer: 0x1,
    iProduct: 0x2,
    iSerialNumber: 0x3,
    bNumConfigurations: 0x1,
}
       DEBUG jaylink                                > scanning 1 interfaces
       DEBUG jaylink                                > J-Link interface is #0
       DEBUG jaylink                                > legacy caps: GET_HW_VERSION | READ_CONFIG | WRITE_CONFIG | SPEED_INFO | GET_MAX_BLOCK_SIZE | GET_HW_INFO | RESET_STOP_TIMED | SELECT_IF | GET_COUNTERS | GET_CPU_CAPS | EXEC_CPU_CMD | SWO | REGISTER | INDICATORS | TEST_NET_SPEED | GET_CAPS_EX
       DEBUG jaylink                                > extended caps: GET_HW_VERSION | READ_CONFIG | WRITE_CONFIG | SPEED_INFO | GET_MAX_BLOCK_SIZE | GET_HW_INFO | RESET_STOP_TIMED | SELECT_IF | GET_COUNTERS | GET_CPU_CAPS | EXEC_CPU_CMD | SWO | REGISTER | INDICATORS | TEST_NET_SPEED | GET_CAPS_EX
       DEBUG probe_rs::probe::jlink                 > Supported speeds: Speeds { base_freq: 96000000, min_div: 24 }
       DEBUG probe_rs::probe::jlink                 > Divider: 24
        INFO cargo_embed                            > Protocol speed 4000 kHz
       DEBUG probe_rs::probe::jlink                 > Attaching to J-Link
       DEBUG probe_rs::probe::jlink                 > Attaching with protocol 'SWD'
        INFO probe_rs::probe::jlink                 > J-Link: S/N: 801026105
       DEBUG probe_rs::probe::jlink                 > J-Link: Capabilities: GET_HW_VERSION | READ_CONFIG | WRITE_CONFIG | SPEED_INFO | GET_MAX_BLOCK_SIZE | GET_HW_INFO | RESET_STOP_TIMED | SELECT_IF | GET_COUNTERS | GET_CPU_CAPS | EXEC_CPU_CMD | SWO | REGISTER | INDICATORS | TEST_NET_SPEED | GET_CAPS_EX
        INFO probe_rs::probe::jlink                 > J-Link: Firmware version: J-Link EDU Mini V1 compiled Jul 17 2020 16:25:21
        INFO probe_rs::probe::jlink                 > J-Link: Hardware version: JLink 1.0.0
        INFO probe_rs::probe::jlink                 > J-Link: Target voltage: 3.29 V
       DEBUG probe_rs::probe::jlink                 > Sucessfully switched to SWD
       DEBUG probe_rs::probe::jlink                 > Attached succesfully
       DEBUG probe_rs::config::registry             > Searching registry for chip with name nRF9160_xxAA
       DEBUG probe_rs::probe::jlink                 > DAP line busy, retries remaining 4.
       DEBUG probe_rs::probe::jlink                 > DAP line busy, retries remaining 3.
       DEBUG probe_rs::probe::jlink                 > DAP line busy, retries remaining 2.
       DEBUG probe_rs::probe::jlink                 > DAP line busy, retries remaining 1.
       DEBUG probe_rs::probe::jlink                 > DAP line busy, retries remaining 0.
       ERROR probe_rs::probe::jlink                 > DAP read timeout.
       DEBUG probe_rs::probe::jlink                 > DAP line busy, retries remaining 4.
       DEBUG probe_rs::probe::jlink                 > DAP line busy, retries remaining 3.
       DEBUG probe_rs::probe::jlink                 > DAP line busy, retries remaining 2.
       DEBUG probe_rs::probe::jlink                 > DAP line busy, retries remaining 1.
       DEBUG probe_rs::probe::jlink                 > DAP line busy, retries remaining 0.
       ERROR probe_rs::probe::jlink                 > DAP read timeout.
        WARN probe_rs::session                      > Could not clear all hardware breakpoints: Probe(Timeout)
       Error failed attaching to target
             
             Caused by:
                 0: An error with the usage of the probe occured
                 1: Operation timed out

This is my Embed.toml:

[default.probe]
# USB vendor ID
# usb_vid = "1337"
# USB product ID
# usb_pid = "1337"
# Serial number
# serial = "12345678"
# The protocol to be used for communicating with the target.
protocol = "Swd"
# The speed in kHz of the data link to the target.
speed = 4000

[default.flashing]
# Whether or not the target should be flashed.
enabled = true
# Whether or not the target should be halted after reset.
# DEPRECATED, moved to reset section
halt_afterwards = false
# Whether or not bytes erased but not rewritten with data from the ELF
# should be restored with their contents before erasing.
restore_unwritten_bytes = false
# The path where an SVG of the assembled flash layout should be written to.
# flash_layout_output_path = "out.svg"

[default.reset]
# Whether or not the target should be reset.
# When flashing is enabled as well, the target will be reset after flashing.
enabled = true
# Whether or not the target should be halted after reset.
halt_afterwards = false

[default.general]
# The chip name of the chip to be debugged.
chip = "nRF9160_xxAA"
# A list of chip descriptions to be loaded during runtime.
chip_descriptions = ["nRF91.yaml"]
# The default log level to be used. Possible values are one of:
#   "OFF", "ERROR", "WARN", "INFO", "DEBUG", "TRACE" 
log_level = "WARN"

[default.rtt]
# Whether or not an RTTUI should be opened after flashing.
# This is exclusive and cannot be used with GDB at the moment.
enabled = true
# A list of channel associations to be displayed. If left empty, all channels are displayed.
channels = [
    # { up = 0, down = 0, name = "name", format = "String" }
]
# The duration in ms for which the logger should retry to attach to RTT.
timeout = 3000
# Whether timestamps in the RTTUI are enabled
show_timestamps = true
# Whether to save rtt history buffer on exit.
log_enabled = false
# Where to save rtt history buffer relative to manifest path.
log_path = "./logs"

[default.gdb]
# Whether or not a GDB server should be opened after flashing.
# This is exclusive and cannot be used with RTT at the moment.
enabled = false
# The connection string in host:port format wher the GDB server will open a socket.
# gdb_connection_string

…and this is nRF91.yaml:

---
name: nRF91 Series
manufacturer: ~
variants:
  - name: nRF9160_xxAA
    part: ~
    memory_map:
      - Ram:
          range:
            start: 536870912
            end: 537133056
          is_boot_memory: false
      - Flash:
          range:
            start: 0
            end: 1048576
          is_boot_memory: true
    flash_algorithms:
      - nrf91xx
      - nrf91xx_uicr
flash_algorithms:
  nrf91xx:
    name: nrf91xx
    description: nRF91xxx
    default: true
    instructions: sLVA8gQFwPIABQAgCesFAUn4BQDB6QEAyGDQshRGAPA9+iCxCesFAcHpAgSwvQnrBQABIUFgAPAr+gAgsL0AvxC1BEYAIADwKfo4sUDyBAHA8gABSUTB6QIEEL1A8gQAwPIAAAnrAAGJaAApBL8AIBC9RPIAAcLyAAEBIgpgWfgAIEhESmBCaIpggmjKYMBoCGEAIBC9AL9A8gQAwPIAAAEhSfgAEEhEACHA6QERwWAA8Ci6sLVA8gQFBEbA8gAFAiBJ+AUACesFAAAhwOkBEcFgAPCl+bT78PEB+xBAMLEJ6wUAAyHA6QIUZSCwvQnrBQABIUFgAPCt+aBCE9gA8Kv5oEIP2QnrBQACIUFgIEYA8ML5Aygcv2cgsL0gRgDw5/kAILC9CesFAAQhwOkCFGYgsL0t6fBBQPIEBwRGwPIABxVGDkYDIAnrBwEAIqMHSfgHAMHpASLKYAbQCesHAcHpAgRlIL3o8IEJ6wcAASFBYADwb/mgQhXYAPBt+aBCEdkJ6wcAAyFBYAbrBAgA8GP5gEUP2QnrBwAEIcDpAhhmIL3o8IEJ6wcABCHA6QIUZiC96PCBCesHAAQhQWAA8Gn5MLEJ6wcAAiGBYGcgvejwgQnrBwAFIUFgIEYA8Fz5AigH0gnrBwACIcDpAhRnIL3o8IEP0f8iIEYxRg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AAAAAAAAAAAAAAAAA==
    pc_init: 1
    pc_uninit: 65
    pc_program_page: 309
    pc_erase_sector: 181
    pc_erase_all: 153
    data_section_offset: 1316
    flash_properties:
      address_range:
        start: 0
        end: 2097152
      page_size: 4096
      erased_byte_value: 255
      program_page_timeout: 1000
      erase_sector_timeout: 3000
      sectors:
        - size: 4096
          address: 0
  nrf91xx_uicr:
    name: nrf91xx_uicr
    description: nRF91xxx UICR Erase
    default: true
    instructions: cLVA8gQGwPIABgAlCesGAEn4BlDA6QFVxWDQshRGAPDj+QAoHr8J6wYBwekCBAVGKEZwvRC1BEYAIADw1flA8gQBwPIAAUlEELHB6QIEA+CJaAApCL8QvUTyAAHC8gABASIKYEDyBALA8gACWfgCMEpES2BTaItgk2jLYNJoCmEQvQC/gLVA8gQAwPIAAAEhSfgAEEhEACHA6QERwWAA8MX5ACCAvQC/ELVA8gQAwPIAAAIhSfgAEEhEACTA6QFExGAA8FP5AUZI8gAAwPL/AP8iAPAL+DCxAPC4+QRGaSgUvwAsACQgRhC9AL9wtUDyBAzA8gAMBSNJ+AwwCesMA0/wAA6EB8PpAe7D+AzgBdAJ6wwBAyLB6QIgDOAJ6wwDT/ABDowHw/gE4AjQCesMAAMiwOkCIU/wZQ5wRnC9SPb/fsDy/w4J6wwDAiRwRVxgBdkJ6wwBBCLB6QIgDeALGA7xAQUJ6wwEAyarQmZgCNkJ6wwABCHA6QITT/BmDnBGcL1RsQAjT/AADgC/xlyWQgfRATOLQvnTC+BP8AAOcEZwvRhECesMAQUiT/ABDsHpAiBwRnC9AL8t6fBBQPIEBsDyAAYVRgRGAyAJ6wYCACOPB0n4BgDC6QEz02AG0AnrBgLC6QIBZSC96PCBSPb/cMDy/wAJ6wYCAiOEQlNgB9kJ6wYABCHA6QIUZiC96PCBChkBMAnrBgMDJ4JCX2AH2QnrBgAEIcDpAhJmIL3o8IEAILDrkQ8b0E/qkQgAJwzgVfgnAET4JwAA8Oj4ATdHRU/wAAAov73o8IFU+CcAATDu0AnrBgAFIeIZwOkCEmggvejwgXC1QPIEDMDyAAwEI0n4DDAJ6wwDT/AADoQHw+kB7sP4DOAF0AnrDAEDIsHpAiAM4AnrDANP8AEOjAfD+ATgB9AJ6wwAAyLA6QIhZSMYRnC9SPb/fsDy/w4J6wwDAiRwRVxgBdkJ6wwBBCLB6QIgDeALGA7xAQUJ6wwEAyarQmZgB9kJ6wwABCHA6QITZiMYRnC9ACW165EPCesMBk/wBAV1YBTQT+qRDgAhAL8EaFL4IVCsQgXRATFxRQDxBAD10wXgCesMAQYiA0bB6QIgGEZwvQAAQPIwEMDy/wABaAExHL8AaHBHQPbgcc/yAAEIeEloYfMLIHBHQPIgIMDy/wABaAExFL8AaE/0gFBwRwC/QPIkIMDy/wABaAExFL8AaE/0AHBwRwC/ACBwRwAgcEcQtf/34f8ERv/36v8A+wTwEL0AvwFEgUKcvwEgcEcD4IhCJL8BIHBHUPgEKwEyHL8AIHBH9OcAv3BHAL8AIHBHAyBwRwMohL9pIHBHgLVAsgWhUfggAEnyBFHF8gMBCGAA8Ar4ACCAvQAAAAACAAAAAQAAAAAAAABJ8gBAxfIDAAFoACn80HBHSfIMUMXyAwABIQFg8OcAv4GwAJAAmE/w/zEBYAGw5+dpIHBHsLX/96f/BEZAsQAlKEb/9+3///eD/wVEpUL30wAgsL0AAAAAAAAAAAAAAAAAAAAAAAAAAA==
    pc_init: 1
    pc_uninit: 53
    pc_program_page: 441
    pc_erase_sector: 169
    pc_erase_all: 133
    data_section_offset: 1136
    flash_properties:
      address_range:
        start: 16744448
        end: 16748544
      page_size: 4096
      erased_byte_value: 255
      program_page_timeout: 1000
      erase_sector_timeout: 3000
      sectors:
        - size: 4096
          address: 0
core: M33

I have no problem flashing the chip using for example JLinkExe.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 39 (39 by maintainers)

Commits related to this issue

Most upvoted comments

Rerunning the example gives me:

Wrote 512 bytes in 47.548317ms (10767.99 bytes/s)
Read  512 bytes in 79.984444ms ( 6401.24 bytes/s)
Verification successful.

Thanks everyone for your help!