Skip to main content
Graduate
June 14, 2025
Solved

STM32H7 + Zephyr + SIGTRAP 0xA05F0000

  • June 14, 2025
  • 1 reply
  • 320 views

I'm running into an issue on two boards (an STM32H735 Discovery Kit) and a custom board with an H743. 

#include <stdio.h>
#include <zephyr/kernel.h>

int main(void)
{
	while (1) {
		printf("Hello there, world!\n");
		k_msleep(1000);
	}
	return 0;
}

If I flash the program, it runs fine. If I start debugging it, it SIGTRAPs at 0xA05F0000 inside the k_msleep() (around sys_clock_tick_get_32()). Even though my debugger says the program is stopped, it continues running doing the printf() and waiting the 1 second in each loop. I'm using VSCode with the Zephyr IDE plugin on a mac - using either stm32cubeprogrammer or OpenOCD as my runner. I'm connected to my custom board with an STLinkV3. I'm using the inbuild STLink on the Discovery Kit board.

I've googled and see a few references to 0xA05F0000 with similar bugs, but nothing that's a definitive answer. Does that address mean anything to anyone?

 

    This topic has been closed for replies.
    Best answer by i2pi

    CONFIG_STM32_ENABLE_DEBUG_SLEEP_STOP=y in prj.conf fixed it.

    1 reply

    i2piAuthorAnswer
    Graduate
    June 14, 2025

    CONFIG_STM32_ENABLE_DEBUG_SLEEP_STOP=y in prj.conf fixed it.