如何在 STM32H7 上触发 HardFault
hardfault_trigger.cpp
((volatile int*)0xFFFFFFFF)[0] = 0;这将执行非法内存访问,从而触发硬故障。由于使用了 volatile,编译器不会将其优化掉。
Check out similar posts by category:
STM32
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow