cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F2xx "USE_HAL_xx_REGISTER_CALLBACKS": where to set them in CubeIDE?

Johannes
Senior

I use CUBEIDE 1.3.0 with MCU Package STM32F2 V1.9.0 for Nucleo F207.

This package generates a file "stm32f2xx_hal_config.h". In this file, all "USE_HAL_***_REGISTER_CALLBACK" defines are set / not set.

What is the proper way to enable these defines? I don't find a switch within the CubeIDE environment. These defines are not in a Begin_user / End-User section. If I enable one, it got overwritten by next time code-generation.

Other CPU types like STM32L4 MCU Packages don't generate these defines, I normally set these as global define with the compiler preprocessor settings.

With F2xx MCU Package, this does not help. The compiler complains about "redefinition" of these defines.

File: stm32f2xx_hal_config.h
 
#define  USE_HAL_SPI_REGISTER_CALLBACKS         0U /* SPI register callback disabled       */
#define  USE_HAL_TIM_REGISTER_CALLBACKS         0U /* TIM register callback disabled       */
#define  USE_HAL_UART_REGISTER_CALLBACKS        0U /* UART register callback disabled      */
#define  USE_HAL_USART_REGISTER_CALLBACKS       0U /* USART register callback disabled     */

1 ACCEPTED SOLUTION

Accepted Solutions
jnewcomb
Associate II

Now supported in CubeMX. From the help PDF:

0693W000007D0XnQAK.png 

View solution in original post

4 REPLIES 4
Imen GH
ST Employee

​Hello @Johannes​,

Your reported case will be raised internally to take in consideration.

Regards

Imen

Hello jvisser,

Could you please share your ioc file ?

Thanks,

Khouloud

Johannes
Senior

See attached file. This file is for STM32F072, happens here as well. (from CUBE_IDE)

Johannes

jnewcomb
Associate II

Now supported in CubeMX. From the help PDF:

0693W000007D0XnQAK.png