)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1001678,"name":"Nishanth Menon","email":"nm@ti.com","username":"nmenon"},"change_message_id":"edf4eee5e7a7040fefa9aa83a387e5fbb6ca80cc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"6ea19d7d_aeb8f265","updated":"2024-05-17 12:41:12.000000000","message":"is soft_reset_halt broken? calling a second halt seems to indicate soft_reset_halt which is supposed to halt after resetting is not working? Should\u0027nt that be fixed instead","commit_id":"181355de3b6b4b18381099b56dc7207331109506"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"2c63405e305a5109ffc9009489206371fe1aa591","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"ff58ab85_066fe1fc","in_reply_to":"6ea19d7d_aeb8f265","updated":"2024-05-17 20:12:20.000000000","message":"I agree, the additional halt is awful.\n\nIn fact a `poll` command is sufficient in place of added `halt`\n\nThere is also related https://sourceforge.net/p/openocd/tickets/360/\nwith debug log:\n```\nDebug: 152 113 cortex_m.c:1069 cortex_m_soft_reset_halt(): [cc32xx.cpu] system reset-halted, DHCSR 0x02030003, DFSR 0x00000008\nDebug: 153 113 command.c:166 script_debug(): command - read_memory 0x01000800 32 2\nDebug: 154 114 command.c:166 script_debug(): command - reg msp 0x200050a0\nDebug: 155 114 target.c:3100 handle_reg_command(): -\nError: 156 114 target.c:3210 handle_reg_command(): Could not write to register \u0027msp\u0027\nDebug: 157 114 command.c:555 run_command(): Command \u0027reg\u0027 failed with error code -304\n```\nIt looks strange: cortex_m_soft_reset_halt() shows success and 1 msec later `reg` complains that target is not halted.\n\nI dig deeper and find out that cortex_m_poll() have to be called TWICE to get out of TARGET_RESET state.\n\nDhruva, could you please test the alternative fix\n8285: target/cortex_m: allow poll quickly get out of TARGET_RESET state | https://review.openocd.org/c/openocd/+/8285\nand give a review?","commit_id":"181355de3b6b4b18381099b56dc7207331109506"}]}
