Difference between revisions of "J-Link debugging USB applications"

From SEGGER Wiki
Jump to: navigation, search
 
Line 2: Line 2:
   
 
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:
 
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 | 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 | semihosting]] is not problematic.
+
# 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 | 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 | semihosting]] is not problematic.
   
2) 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.
+
# 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.

Latest revision as of 14:00, 9 September 2020


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.