2022-07-05 01:24 AM
I'm trying to get into UART interrupt. It used to be copying the 'weak' function declaration and declare our own in main such as:
main()
{
....
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
{
// usr code here
}
....
}
However, this apparently became legacy. Now I get the following:
"stm32h7xx_it.c"
"stm32h7xx_it.c"
**
* @brief This function handles USART3 global interrupt.
*/
void USART3_IRQHandler(void)
{
/* USER CODE BEGIN USART3_IRQn 0 */
/* USER CODE END USART3_IRQn 0 */
HAL_UART_IRQHandler(&huart3);
/* USER CODE BEGIN USART3_IRQn 1 */
/* USER CODE END USART3_IRQn 1 */
}
Please advise an App Note describing how we handle the interrupt the same way we used to do.
Solved! Go to Solution.
2022-07-06 12:14 PM
Hi @Pavel A. , I started the project in TouchGFX designer and it generated the STM32CubeIDE project, and from there I open the cube mx ioc file etc.... As you can see the project tree is not the customary "inc\src" branches. I'll try a simple project and debug through it and come back with my understanding. Thank you.
2022-07-08 12:34 AM
I've got the code compiled successfully but with IDE v1.8.0, MX v6.3.0, GFX v4.18.0. I have not yet received the discovery board to life-test it though. However, this is not the sought for solution, I still need link to AN on the subject.
2022-07-15 02:46 PM
Expand the Includes. The first item should be Core/Inc of your project, where you should find stm32h7xx_hal_conf.h and all the others included header files.
2022-08-12 09:01 AM
The IRQHandlers has *always* been how interrupts are serviced, what the code does is call into the HAL so it can call your call-backs once it qualifies the source and determines the mode of dispatch.
The HAL adds a lot of unnecessary layers, and one should remain cognizant that call-backs are called under interrupt context, with the limits and expectations that come with that. ie that they block other interrupts, and should complete quickly, without blocking functions, or ones spinning on timeouts.