J-Link debugging USB applications

From SEGGER Wiki
Jump to: navigation, search

When debugging target applications with J-Link that themselves enumerate as USB devices at the same PC where J-Link is connected to, some special things should be considered:

  1. The target CPU should not be halted during the enumeration process because many USB hubs to not handle delays in the enumeration phase properly and sometimes just hang / block all other devices that are connected to the same USB hub. This "do not halt" rule also applies when using semihosting in the project as this also temporarily halts the CPU. There should not be any semihosting activity during the enumeration phase. Before and after enumeration, semihosting is not problematic.
  1. Ideally, J-Link and the target device should not be connected to the same USB hub in case 1) cannot be guaranteed. This avoids the previously mentioned blocking / hanging of other devices connected to the same USB hub.