@@ -787,6 +787,9 @@
*/
#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \
/* System halt code here.*/ \
+ while (*reason) { \
+ while ((USART1->SR & USART_SR_TXE) == 0) { __NOP(); } \
+ USART1->DR = *reason; reason ++; } \
}
/**