Categories

{{ selectedCategory.name }}

{{ topic.Title }} {{ topic.Ddate | formatDate }}

{{ topic.Content }}

No topics found!

Infineon TriCore: Error 258: Failed to initialize debug session / DAP Initialization failed

10-Mar-2023

Possible causes:

  1. Faulty hardware: Target, Debug Adapter or Active Probe.
  2. CPU is always in reset or debugger cannot reset the CPU.
  3. Bad contact if the CPU is in a socket.
  4. External watchdog resets the chip periodically.
  5. DAP Wide mode is selected in winIDEA in Hardware menu / CPU Options / SoC tab, however only DAP Standard mode is supported by the CPU.
  6. DAP Standard / Wide  is selected in winIDEA, but JTAG Debug channel is configured via TRST' pin.


Possible solutions: 

1. Change the hardware.
  • Try with another Target if available. 
  • If you are using a custom board, use an evaluation board from Infineon and iSYSTEM example. Examples are a part of winIDEA and can be installed by selecting Help menu / Install Examples.
  • Try with another Debug Adapter or Active Probe if available.
2.1 Verify, if a signal PORST’ is always low.

The reason could be faulty target or Debug Adapter (refer to  the first solution) or active watchdog which holds the signal to logic low level.

  • Detect and log reset on PORST’ pin with winIDEA 9.17.0 or newer. Refer to the topic Active Watchdog issues (solution 2).
  • Use Logic Analyzer (if available) and verify, if the DAP that starts the  sequence, corresponds to the sequence shown in the example below.

The start of emulation on TriCore DAP. Trigger is set to the positive edge on RESET. After reset DAP communication goes via two lines (DAP0 and DAP1). It switches to 3 pin mode if DAP Wide is selected. 

DAP protocol is a message based protocol. Debugger sends command (telegram) and ECU answers to command at the same line.



Zoomed recording when reset is released. 



Zoomed recording when first DAP telegram is sent. First telegram is SYNC telegram where ECU answer with 0xAAAAAAAA (See the 10101010101010101 stream).



2.2 Bent pin on the DTM connector.

(In most cases that is the pin 40 on ST1 connector). Bent pin disables connection between the debugger and the Target or causes a short-circuit with the pin 38 which is usually most of the time low.



3.  Bad contact between CPU and the socket.
  • Power off the Target and the debugger.
  • Carefully press the socket down a few times to realign the CPU.
  • Carefully remove the CPU from the socket and clean both the CPU and the socket before you insert the CPU back.
4. Disable watchdogs.  

winIDEA is using a FLASH monitor which is used to program FLASH during download operation. Debugger first initializes part of the target RAM where monitor will be placed, then downloads monitor and execute it. If external watchdog is triggered it causes CPU to reset which invalidates RAM and flash monitor stops working and hence error message displayed by the debugger.

4.1. Refer to the solution 2.1 of this topic.
4.2 Inspect the schematics of the target.

Make sure you are not using any external watchdog chip (e.g. Infineon TLE9278QX, TLE7368, TLF35584, NXP UJA113X). Follow the example below.

Example: Emulator’s signal PORST’ is an open drain with 1K Ohm pull-up resistor which can be pulled down by the external watchdog chip. CPU behaves as a multiple output system power supply and when the watchdog is enabled, this chip expects that it is disabled in ~600ms after power on reset. If it is not disabled, it resets the TriCore chip. After that multiple output system power supply is turned off and hence cuts the power to the TriCore chip.

  • Use a pull-up resistor instead of a pull-down resistor. Chip has an input TM (Test Mode) where this operation can be disabled. 


  • Use initialization sequence and make sure it will be executed entirely:
    • Open Hardware menu / CPU Options / Reset
    • Upload an initialization file to the Initialization section
    • In Target RESET timeout field type 2000 ms (In most cases is enough)

NoteThat sequence must be executed before 600ms expires (that is time after after target power on and not after reset). It initializes SPI in TriCore chip and via SPI communication disables watchdog in the TLF chip. 


5. Please refer to the Infineon’s documentation.

Check which Debug Mode (Standard, Wide) is supported.  


6.  Make sure that selection in winIDEA (Hardware menu / CPU Options / SoC) corresponds with the actual logic levels on TRST’ pin during power on reset.

It is recommended to connect the TRST' pin:

  • via pull-up resistor to the VCC and to the DAP connector or
  • via pull-down resistor to the GND and to the DAP connector

Note: Signal TRST’ (previously DAPEN) is used to select either DAP or JTAG on power on reset. It is important which logic level is present on the TRST' pin during power on reset sequence: if logic 0 -  JTAG is selected; if logic 1 -  DAP is selected.

Was this answer helpful?

Sorry this article didn't answer your question, we'd love to hear how we can improve it.
Note: This form won't submit a case. We'll just use it to make this article better.

Similar topics

{{ topic.Title }} {{ topic.Ddate | formatDate }}

{{ topic.Content }}

No similar topics found!

Other topics in the same category

{{ topic.Title }} {{ topic.Ddate | formatDate }}

{{ topic.Content }}

No topics found!