2.9. When selecting microcontrollers in the STM32U3 series

For STM32U3 projects using the HSP_ENGINE middleware, a build issue may occur indicating a type incompatibility after the following scenario:

  • Activate the HSP_ENGINE middleware in sequencer mode.

  • Add a new processing list under the Processing List tab.

  • Create a new buffer under the Buffers tab.

  • Select that buffer as an input, output, or coef buffer.

  • Add or update a processing function.

  • Go back to the Buffers tab and change the C type of the used buffer.

  • Generate the code.

When debugging a Cube project with STM32U366E-DK, a HardFault_Handler() error can occur.

Workaround : Enable the VLCD pin and add the boot code that matches the selected LCD clock source.

If the low-speed internal (LSI) clock is selected for the LCD, use:

HAL_PWR_EnableBkUpAccess(); __HAL_RCC_LCD_CONFIG(RCC_LCDCLKSOURCE_LSI);

If the low-speed external (LSE) clock is selected for the LCD, use:

HAL_PWR_EnableBkUpAccess(); __HAL_RCC_LCD_CONFIG(RCC_LCDCLKSOURCE_LSE);