)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"b55880d19997e28f7ea57ecd50f392c200d37e16","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"044e3292_4a1ed308","updated":"2025-05-02 16:40:36.000000000","message":"The timeout fixes single instruction loops but breaks WFI/WFE:\nOn resume the CPU will continue after WFI/WFE instruction instead of waiting.\nIMO it\u0027s easier to break a single instruction loop manually (it sometimes happen when debugging) than to debug waiting for an interrupt/event when the debugger prevents proper waiting.\nI think that we should leave the code as is or avoid the timeout in case of WFI/WFE","commit_id":"9c2ad5810574010e0da259011e6d3d338da1b7f9"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"c21b515c2cae88645324b509ef34a751dde02f90","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"32d83d32_d60a1e0a","in_reply_to":"044e3292_4a1ed308","updated":"2025-05-02 16:52:10.000000000","message":"GDB expects the target to be halted after a GDB stepi command.\nSo we should halt even in case of WFI/WFE.","commit_id":"9c2ad5810574010e0da259011e6d3d338da1b7f9"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"b302f2cf00deb6c7a860573e4af9c791a6ba47ad","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"922191b5_8952ca0e","in_reply_to":"072c0e99_eeed77d0","updated":"2025-05-02 17:07:09.000000000","message":"Just tested Cortex-M behavior on WFI and single-step. It\u0027s the same behavior introduced by this patch.","commit_id":"9c2ad5810574010e0da259011e6d3d338da1b7f9"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"a5cf057d1a44e00ce1b64111e40a2ba0d68884a6","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"072c0e99_eeed77d0","in_reply_to":"32d83d32_d60a1e0a","updated":"2025-05-02 16:57:33.000000000","message":"Even without this patch, if the CPU is in WFI/WFE and we halt it from GDB with CTRL-C, the PC points to the instruction following WFI/WFE. GDB \u0027continue\u0027 will not go back in WFI/WFE.\nIt should be up to the FW to verify if the exit from WFI/WFE is a real use case or a spurious interrupt, e.g. injected by the debugger, and return in WFI/WFE after such verification.","commit_id":"9c2ad5810574010e0da259011e6d3d338da1b7f9"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"1491388137f2551e4e0a71f81c1e67a19115b3d8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"d28e2d38_6dc9cfa1","in_reply_to":"922191b5_8952ca0e","updated":"2025-05-03 06:41:12.000000000","message":"Oh yes, I usually use gdb `next` command to step around WFI so I used to stepping waits at WFI (provided that gdb uses breakpoint instead of stepping). You\u0027re right that gdb `nexti` or OpenOCD `step` does not wait at WFI on Cortex-M. Ok then, let\u0027s make it similar on Cortex-A.\n\n\u003e It should be up to the FW to verify if the exit from WFI/WFE is a real use\n\u003e case or a spurious interrupt, e.g. injected by the debugger, and return in\n\u003e WFI/WFE after such verification.\n\nSure, but it\u0027s very annoying to step through such loop again and again when you want to step into interrupt handler.","commit_id":"9c2ad5810574010e0da259011e6d3d338da1b7f9"}]}
