JTAG IDCODE ON ESP32-U4WDH

Scott.Bonomi
Posts: 73
Joined: Mon Mar 09, 2020 7:36 pm

JTAG IDCODE ON ESP32-U4WDH

Postby Scott.Bonomi » Tue Jul 07, 2020 5:53 pm

I have a fault I cannot understand. One one of my ESP32-U4WDH devices on Modified Solo-1 DevKitC Modules, I cannot connect to JTAG. The statements highlighted below seem to be the cause. My other two devices respond and I get
Info : 394 874 core.c:959 jtag_examine_chain_display(): JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1). I am trying to undestand the failure mechanism that apparently cleared a factory register and still allows the device to mostly perform.

from openocd running with debug level 3

Debug: 359 1138 command.c:143 script_debug(): command - ocd_transport ocd_transport init
Debug: 361 1141 transport.c:239 handle_transport_init(): handle_transport_init
Debug: 362 1144 jlink.c:905 jlink_reset(): TRST: 0, SRST: 0.
Debug: 367 1148 core.c:729 jtag_add_reset(): SRST line released
Debug: 368 1151 core.c:753 jtag_add_reset(): TRST line released
Debug: 369 1153 core.c:327 jtag_call_event_callbacks(): jtag event: TAP reset
Debug: 370 1157 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_jtag arp_init
Debug: 371 1161 command.c:143 script_debug(): command - ocd_jtag ocd_jtag arp_init
Debug: 372 1164 core.c:1407 jtag_init_inner(): Init JTAG chain
Debug: 373 1168 core.c:327 jtag_call_event_callbacks(): jtag event: TAP reset
Debug: 383 1172 core.c:1060 jtag_examine_chain(): DR scan interrogation for IDCODE/BYPASS
Debug: 384 1175 core.c:327 jtag_call_event_callbacks(): jtag event: TAP reset
Error: 394 1180 core.c:949 jtag_examine_chain_check(): JTAG scan chain interrogation failed: all ones
Error: 395 1184 core.c:950 jtag_examine_chain_check(): Check JTAG interface, timings, target power, etc.
Error: 396 1189 core.c:1452 jtag_init_inner(): Trying to use configured scan chain anyway...

Debug: 397 1192 core.c:1190 jtag_validate_ircapture(): IR capture validation scan
Error: 407 1196 core.c:1242 jtag_validate_ircapture(): esp32.cpu0: IR capture error; saw 0x1f not 0x01
Debug: 408 1202 core.c:327 jtag_call_event_callbacks(): jtag event: TAP reset
Warn : 418 1207 core.c:1475 jtag_init_inner(): Bypassing JTAG setup events due to errors
Debug: 419 1211 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_dap init
Debug: 420 1214 command.c:143 script_debug(): command - ocd_dap ocd_dap init
Debug: 423 1219 arm_dap.c:105 dap_init_all(): Initializing all DAPs ...
Debug: 424 1222 openocd.c:159 handle_init_command(): Examining targets...
Debug: 425 1225 target.c:1658 target_call_event_callbacks(): target event 17 (examine-start)
Debug: 426 1230 esp32.c:963 esp32_handle_target_event(): esp32_handle_target_event 17
Debug: 436 1235 esp32.c:2160 xtensa_esp32_examine(): xtensa_esp32_examine: Target idcode=ffffffff
Debug: 437 1238 openocd.c:161 handle_init_command(): target examination failed

ESP_Sprite
Posts: 9051
Joined: Thu Nov 26, 2015 4:08 am

Re: JTAG IDCODE ON ESP32-U4WDH

Postby ESP_Sprite » Tue Jul 07, 2020 6:20 pm

This effectively means the device doesn't react to JTAG at all. Can be anything, from loose wires to GPIO pins that are used for something else in the program.

Scott.Bonomi
Posts: 73
Joined: Mon Mar 09, 2020 7:36 pm

Re: JTAG IDCODE ON ESP32-U4WDH

Postby Scott.Bonomi » Tue Jul 07, 2020 7:16 pm

Than you for a response, in that case, how do you explain


Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Error: cpu0: xtensa_write_memory (line 802): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: xtensa_write_memory (line 802): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: xtensa_write_memory (line 802): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Warn : esp32: Failed writing 4 bytes at address 0x3ff48000, data - 00, 20, 49, 9c, 4c, 00, 00, 00
Error: xtensa_write_uint32_list: error writing to 3ff48000
Warn : esp32_soc_reset xtensa_write_uint32_list (reg_value_pairs_pre) err=-4

Scott.Bonomi
Posts: 73
Joined: Mon Mar 09, 2020 7:36 pm

Re: JTAG IDCODE ON ESP32-U4WDH

Postby Scott.Bonomi » Tue Jul 07, 2020 8:07 pm

or this case, where it connects to GDB and then goes into an error state
11727 11758 core.c:1521 jtag_init_reset(): Initializing with hard TRST+SRST reset
Debug: 11728 11758 core.c:742 jtag_add_reset(): JTAG reset with TLR instead of TRST
Debug: 11729 11758 core.c:327 jtag_call_event_callbacks(): jtag event: TAP reset
Debug: 11739 11774 core.c:1407 jtag_init_inner(): Init JTAG chain
Debug: 11740 11774 core.c:327 jtag_call_event_callbacks(): jtag event: TAP reset
Debug: 11750 11774 core.c:1060 jtag_examine_chain(): DR scan interrogation for IDCODE/BYPASS
Debug: 11751 11774 core.c:327 jtag_call_event_callbacks(): jtag event: TAP reset
Info : 11761 11774 core.c:959 jtag_examine_chain_display(): JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Debug: 11762 11774 core.c:1190 jtag_validate_ircapture(): IR capture validation scan
Debug: 11772 11774 core.c:1248 jtag_validate_ircapture(): esp32.cpu0: IR capture 0x01
Debug: 11773 11774 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_transport select
Debug: 11774 11774 command.c:143 script_debug(): command - ocd_transport ocd_transport select
Debug: 11775 11774 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_esp32 cget -chain-position
Debug: 11776 11774 command.c:143 script_debug(): command - ocd_esp32 ocd_esp32 cget -chain-position
Debug: 11777 11774 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_jtag tapisenabled esp32.cpu0
Debug: 11778 11774 command.c:143 script_debug(): command - ocd_jtag ocd_jtag tapisenabled esp32.cpu0
Debug: 11779 11774 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_esp32 invoke-event examine-start
Debug: 11780 11774 command.c:143 script_debug(): command - ocd_esp32 ocd_esp32 invoke-event examine-start
Debug: 11781 11774 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_esp32 arp_examine allow-defer
Debug: 11782 11774 command.c:143 script_debug(): command - ocd_esp32 ocd_esp32 arp_examine allow-defer
Debug: 11792 11774 esp32.c:2163 xtensa_esp32_examine(): xtensa_esp32_examine: Target idcode=0733bff2 DSR=8000cc11
Debug: 11793 11774 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_esp32 invoke-event examine-end
Debug: 11794 11774 command.c:143 script_debug(): command - ocd_esp32 ocd_esp32 invoke-event examine-end
Debug: 11795 11774 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_esp32 invoke-event reset-assert-pre
Debug: 11796 11774 command.c:143 script_debug(): command - ocd_esp32 ocd_esp32 invoke-event reset-assert-pre
Debug: 11797 11774 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_transport select
Debug: 11798 11774 command.c:143 script_debug(): command - ocd_transport ocd_transport select
Debug: 11799 11774 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_esp32 cget -chain-position
Debug: 11800 11774 command.c:143 script_debug(): command - ocd_esp32 ocd_esp32 cget -chain-position
Debug: 11801 11774 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_jtag tapisenabled esp32.cpu0
Debug: 11802 11774 command.c:143 script_debug(): command - ocd_jtag ocd_jtag tapisenabled esp32.cpu0
Debug: 11803 11774 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_esp32 arp_reset assert 1
Debug: 11804 11774 command.c:143 script_debug(): command - ocd_esp32 ocd_esp32 arp_reset assert 1
Debug: 11805 11774 target.c:2045 target_free_all_working_areas_restore(): freeing all working areas
Debug: 11806 11774 target.c:1786 print_wa_layout(): 0x40090000-0x400933ff (13312 bytes)
Debug: 11807 11774 target.c:2045 target_free_all_working_areas_restore(): freeing all working areas
Debug: 11808 11774 target.c:1786 print_wa_layout(): 0x3ffc0000-0x3ffc5fff (24576 bytes)
Debug: 11809 11774 esp108_common.c:471 esp32_soc_reset(): esp32_soc_reset 471
Debug: 11810 11774 esp32.c:662 xtensa_read_memory(): esp32: xtensa_read_memory: reading 76 bytes from addr 0x50000000
Debug: 11829 11774 esp32.c:747 xtensa_write_memory(): esp32: xtensa_write_memory: writing 76 bytes to addr 0x50000000
Debug: 11848 11774 esp32.c:747 xtensa_write_memory(): esp32: xtensa_write_memory: writing 4 bytes to addr 0x3ff48034
Debug: 11867 11774 esp32.c:747 xtensa_write_memory(): esp32: xtensa_write_memory: writing 4 bytes to addr 0x3ff48070
Debug: 11886 11774 esp32.c:747 xtensa_write_memory(): esp32: xtensa_write_memory: writing 4 bytes to addr 0x3ff480b0
Debug: 11905 11774 esp32.c:747 xtensa_write_memory(): esp32: xtensa_write_memory: writing 4 bytes to addr 0x3ff480b4
Debug: 11924 11774 esp32.c:747 xtensa_write_memory(): esp32: xtensa_write_memory: writing 4 bytes to addr 0x3ff48000
Error: 11943 11774 esp108_common.c:180 esp108_do_checkdsr(): cpu0: xtensa_write_memory (line 802): DSR (FFFFFFFF) indicates target still busy!
Error: 11944 11774 esp108_common.c:184 esp108_do_checkdsr(): cpu0: xtensa_write_memory (line 802): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: 11945 11774 esp108_common.c:188 esp108_do_checkdsr(): cpu0: xtensa_write_memory (line 802): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Warn : 11955 11774 esp32.c:808 xtensa_write_memory(): esp32: Failed writing 4 bytes at address 0x3ff48000, data - 00, 20, 49, 9c, 4c, 00, 00, 00
Error: 11956 11774 esp108_common.c:270 xtensa_write_uint32_list(): xtensa_write_uint32_list: error writing to 3ff48000
Warn : 11957 11774 esp108_common.c:567 esp32_soc_reset(): esp32_soc_reset xtensa_write_uint32_list (reg_value_pairs_pre) err=-4

Scott.Bonomi
Posts: 73
Joined: Mon Mar 09, 2020 7:36 pm

Re: JTAG IDCODE ON ESP32-U4WDH

Postby Scott.Bonomi » Wed Jul 08, 2020 12:05 am

This is a repeating issue -

Debug: 13978 17959 esp32.c:2163 xtensa_esp32_examine(): xtensa_esp32_examine: Target idcode=0733bff2 DSR=8000cc11
Debug: 13979 17959 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_esp32 invoke-event examine-end
Debug: 13980 17959 command.c:143 script_debug(): command - ocd_esp32 ocd_esp32 invoke-event examine-end
Debug: 13981 17959 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_esp32 invoke-event reset-assert-pre
Debug: 13982 17959 command.c:143 script_debug(): command - ocd_esp32 ocd_esp32 invoke-event reset-assert-pre
Debug: 13983 17959 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_transport select
Debug: 13984 17959 command.c:143 script_debug(): command - ocd_transport ocd_transport select
Debug: 13985 17960 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_esp32 cget -chain-position
Debug: 13986 17960 command.c:143 script_debug(): command - ocd_esp32 ocd_esp32 cget -chain-position
Debug: 13987 17960 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_jtag tapisenabled esp32.cpu0
Debug: 13988 17960 command.c:143 script_debug(): command - ocd_jtag ocd_jtag tapisenabled esp32.cpu0
Debug: 13989 17960 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_esp32 arp_reset assert 1
Debug: 13990 17960 command.c:143 script_debug(): command - ocd_esp32 ocd_esp32 arp_reset assert 1
Debug: 13991 17960 target.c:2045 target_free_all_working_areas_restore(): freeing all working areas
Debug: 13992 17960 target.c:1786 print_wa_layout(): 0x40090000-0x400933ff (13312 bytes)
Debug: 13993 17960 target.c:2045 target_free_all_working_areas_restore(): freeing all working areas
Debug: 13994 17960 target.c:1786 print_wa_layout(): 0x3ffc0000-0x3ffc5fff (24576 bytes)
Debug: 13995 17960 esp108_common.c:471 esp32_soc_reset(): esp32_soc_reset 471
Debug: 13996 17960 esp32.c:662 xtensa_read_memory(): esp32: xtensa_read_memory: reading 76 bytes from addr 0x50000000
Debug: 14015 17963 esp32.c:747 xtensa_write_memory(): esp32: xtensa_write_memory: writing 76 bytes to addr 0x50000000
Debug: 14034 17965 esp32.c:747 xtensa_write_memory(): esp32: xtensa_write_memory: writing 4 bytes to addr 0x3ff48034
Debug: 14053 17966 esp32.c:747 xtensa_write_memory(): esp32: xtensa_write_memory: writing 4 bytes to addr 0x3ff48070
Debug: 14072 17967 esp32.c:747 xtensa_write_memory(): esp32: xtensa_write_memory: writing 4 bytes to addr 0x3ff480b0
Debug: 14091 17967 esp32.c:747 xtensa_write_memory(): esp32: xtensa_write_memory: writing 4 bytes to addr 0x3ff480b4
Debug: 14110 17968 esp32.c:747 xtensa_write_memory(): esp32: xtensa_write_memory: writing 4 bytes to addr 0x3ff48000
Error: 14129 17969 esp108_common.c:180 esp108_do_checkdsr(): cpu0: xtensa_write_memory (line 802): DSR (FFFFFFFF) indicates target still busy!
Error: 14130 17969 esp108_common.c:184 esp108_do_checkdsr(): cpu0: xtensa_write_memory (line 802): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: 14131 17969 esp108_common.c:188 esp108_do_checkdsr(): cpu0: xtensa_write_memory (line 802): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Warn : 14141 17970 esp32.c:808 xtensa_write_memory(): esp32: Failed writing 4 bytes at address 0x3ff48000, data - 00, 20, 49, 9c, 4c, 00, 00, 00
Error: 14142 17970 esp108_common.c:270 xtensa_write_uint32_list(): xtensa_write_uint32_list: error writing to 3ff48000
Warn : 14143 17970 esp108_common.c:567 esp32_soc_reset(): esp32_soc_reset xtensa_write_uint32_list (reg_value_pairs_pre) err=-4
User : 14144 17970 command.c:544 command_print():

Debug: 14145 17970 command.c:645 run_command(): Command 'reset' failed with error code -4
User : 14146 17970 command.c:708 command_run_line():
Info : 14156 17970 esp32.c:1728 xtensa_poll(): xtensa_poll: Target offline
Error: 14157 17970 esp32.c:1733 xtensa_poll(): xtensa_poll: Target failure

ESP_Sprite
Posts: 9051
Joined: Thu Nov 26, 2015 4:08 am

Re: JTAG IDCODE ON ESP32-U4WDH

Postby ESP_Sprite » Wed Jul 08, 2020 7:20 am

Can be lots of things as well - I recall having seen this when the TDI or TMS line was disconnected, but it also may be that your JTAG adapter speed is too fast.

Scott.Bonomi
Posts: 73
Joined: Mon Mar 09, 2020 7:36 pm

Re: JTAG IDCODE ON ESP32-U4WDH

Postby Scott.Bonomi » Wed Jul 08, 2020 5:16 pm

I have dropped the JTAG speed to 500k, If you have information that lower speeds are appropriate, please let me know what can be expected to work.

ESP_Sprite
Posts: 9051
Joined: Thu Nov 26, 2015 4:08 am

Re: JTAG IDCODE ON ESP32-U4WDH

Postby ESP_Sprite » Wed Jul 08, 2020 7:55 pm

Can't say - that all is very dependent on your adapter and how you wired the thing up. Suggest you try something stupidly low like 10KHz first, to see if that solves the problem - if it does not, the issue is not the speed of the adapter.

ESP_Sprite
Posts: 9051
Joined: Thu Nov 26, 2015 4:08 am

Re: JTAG IDCODE ON ESP32-U4WDH

Postby ESP_Sprite » Thu Jul 09, 2020 7:01 am

Scott.Bonomi wrote:
Wed Jul 08, 2020 5:16 pm
I have dropped the JTAG speed to 500k, If you have information that lower speeds are appropriate, please let me know what can be expected to work.
Ah, I just ran into another thing that can have similar issues as you have. I can't see what OpenOCD and ESP32 you have, but do you happen to use an ECO3 ESP32 and an older OpenOCD? If so, you probably want to upgrade OpenOCD-esp32 to the latest version we provide. ECO3 needs some special handling, this was only introduced in v0.10.0-esp32-20191008 .

Scott.Bonomi
Posts: 73
Joined: Mon Mar 09, 2020 7:36 pm

Re: JTAG IDCODE ON ESP32-U4WDH

Postby Scott.Bonomi » Thu Jul 09, 2020 9:30 pm

I Went up a couple of wire sizes to ensure solid connections, I am running at 500 KHz for JTAG Speed.
I am now back to using the solo-1 configuration file for openocd. Overriding SPI voltage to 3.3.
One of the other postings indicated that -c "gdb_breakpoint_override hard" might help.

I am still getting an error in write memory. ocd log claims error is on writing to 0x3FF48000
openocd reports success at writing to 0x3ff48034, (also -8070, -80b0, & -80b4, ) before getting write fault at -8000
'
Debug: 12162 16581 esp32.c:747 xtensa_write_memory(): esp32: xtensa_write_memory: writing 4 bytes to addr 0x3ff48000
Error: 12181 16582 esp108_common.c:180 esp108_do_checkdsr(): cpu0: xtensa_write_memory (line 802): DSR (FFFFFFFF) indicates target still busy!
Error: 12182 16582 esp108_common.c:184 esp108_do_checkdsr(): cpu0: xtensa_write_memory (line 802): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: 12183 16582 esp108_common.c:188 esp108_do_checkdsr(): cpu0: xtensa_write_memory (line 802): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Warn : 12193 16583 esp32.c:808 xtensa_write_memory(): esp32: Failed writing 4 bytes at address 0x3ff48000, data - 00, 20, 49, 9c, 4c, 00, 00, 00


The same write_memory error message is reported via GDB.

With only changing the Module under test to a Solo-1, The debug process runs normally. This involves swapping the module in on a breadboard where all the connections other than USB are through the board. This is a repeatable issue.

Who is online

Users browsing this forum: No registered users and 112 guests