Associate II
January 8, 2025
Solved
DCT Issue: Missing HAL Interrupt Handler for USART6
- January 8, 2025
- 5 replies
- 1788 views
Hi everyone,
I'm encountering an issue with the STM32 Device Configuration Tool: it doesn't properly generate the global interrupt handler function for one of the UARTs in my project:
The generated interrupt handlers for USART1 and USART2 include call of the default HAL interrupt handler (HAL_UART_IRQHandler(&huartX);) but the handler for USART6 is missing this line.
/**
* @brief This function handles USART1 global interrupt.
*/
void USART1_IRQHandler(void)
{
/* USER CODE BEGIN USART1_IRQn 0 */
/* USER CODE END USART1_IRQn 0 */
HAL_UART_IRQHandler(&huart1);
/* USER CODE BEGIN USART1_IRQn 1 */
/* USER CODE END USART1_IRQn 1 */
}
/**
* @brief This function handles USART2 global interrupt.
*/
void USART2_IRQHandler(void)
{
/* USER CODE BEGIN USART2_IRQn 0 */
/* USER CODE END USART2_IRQn 0 */
HAL_UART_IRQHandler(&huart2);
/* USER CODE BEGIN USART2_IRQn 1 */
/* USER CODE END USART2_IRQn 1 */
}
/**
* @brief This function handles USART6 global interrupt.
*/
void USART6_IRQHandler(void)
{
/* USER CODE BEGIN USART6_IRQn 0 */
// missing from here:
/* USER CODE END USART6_IRQn 0 */
/* USER CODE BEGIN USART6_IRQn 1 */
/* USER CODE END USART6_IRQn 1 */
}
Project Details:
- Project: coprocessor_ica
- Processor: STM32F411CEU
- Configuration:
- 3 UARTs configured in the .ioc file (asynchronous mode, using DMA for both TX and RX)
- Global (and DMA) interrupts enabled for all three UARTs
- Using HAL drivers
Problem:
- The generated interrupt handlers for USART1 and USART2 include the default HAL interrupt handler call (HAL_UART_IRQHandler(&huartX);), but the handler for USART6 is missing this line.
Observations:
I have another project (coprocessor_vica) with the same processor and a very similar configuration.
- The main differences are the pin names and an additional timer configured in coprocessor_vica.
- In this project, the issue doesn't occur.
To investigate, I:
- Backed up the coprocessor_ica.ioc file.
- Copied the coprocessor_vica.ioc file into the coprocessor_ica directory and replaced all "vica" strings with "ica" using a text editor.
- After regeneration, the interrupt handler issue was resolved in coprocessor_ica.
- Renamed the pins and removed the extra timer to match the original coprocessor_ica setup.
- The issue reappeared.
- I created a new project from the original(ly faulty) coprocessor_ica.ioc in a different workspace, and generated the code. The handler call is still missing.
Questions:
- What could be causing this behavior?
- Are there any logs for the code generation process where I could trace where the issue occurs?
Environment:
- ST32CubeIDE:
- Version: 1.16.1
- Build: 22882_20240916_0822 (UTC)
- STM32CubeMX:
- Version: 6.12.1-RC4
- Build: 20240912-2256 (UTC)
- Platform:
- Apple M1
- macOS Sequoia 15.2 (24C101)
I've attached both .ioc files.
Thanks in advance for any insights or advice!

