2022-11-23 07:38 AM
Often trip to Error_Handler from usb_device.c and usbd_conf.c.
void Error_Handler(void)
{
/* USER CODE BEGIN Error_Handler_Debug */
/* User can add his own implementation to report the HAL error return state */
__disable_irq();
while (1)
{
}
/* USER CODE END Error_Handler_Debug */
}
How can I know how cause this issue?
Thanks,
Jiannong
2022-11-23 10:19 AM
>>How can I know how cause this issue?
Go back up the call stack?
Instrument the places it is called from so you understand the issues that it encountered?
Perhaps use the version that's passed the source file, and line number, so you can quickly identify and report where it came from?
Error_Handler(__FILE__, __LINE__); // ??
2022-11-23 01:14 PM
/* User can add his own implementation to report the HAL error return state */
And where the user is supposed to get the HAL error in this function? I guess it's a rhetorical question...
2022-11-24 06:34 AM
Hi Tesla and Piranha,
I got your ideals. thank you very much for your suggestion.
Jiannong
2022-11-24 06:48 AM
Certainly a "Roll Over and Die" approach from ST
This could have been executed so much better, that and having the Hard Fault Handler do something remotely useful. Instead we have thousands of users, wasting thousands of man-hours, and learning so little...