AnsweredAssumed Answered

STMCubeMX USE_FULL_ASSERT compile error when DAC enabled

Question asked by kahlon.yon on Mar 3, 2016
Latest reply on Mar 7, 2016 by kahlon.yon
I have the STM32F303RE Nucleo evaluation board, and I've used CubeMX to configure & generate the HAL drivers.

I've configured a DAC on one of the timers, and everything compiles/runs fine, except when I enabled "USE_FULL_ASSERT" then I get the following compile error.

../Src/main.c(329): error:  #20: identifier "HAL_REMAPTRIGGER_DAC1" is undefined
    __HAL_REMAPTRIGGER_ENABLE(HAL_REMAPTRIGGER_DAC1_TRIG);

This comes down to the following code generated in stm32fxx_hal.h:

#define IS_HAL_REMAPTRIGGER(RMP) ((((RMP) & HAL_REMAPTRIGGER_DAC1)  == HAL_REMAPTRIGGER_DAC1)       || \
                                  (((RMP) & HAL_REMAPTRIGGER_TIM1_ITR3)  == HAL_REMAPTRIGGER_TIM1_ITR3)  || \
                                  (((RMP) & HAL_REMAPTRIGGER_DAC1_TRIG3) == HAL_REMAPTRIGGER_DAC1_TRIG3) || \
                                  (((RMP) & HAL_REMAPTRIGGER_DAC1_TRIG5) == HAL_REMAPTRIGGER_DAC1_TRIG5))
#else
#define IS_HAL_REMAPTRIGGER(RMP) ((((RMP) & HAL_REMAPTRIGGER_DAC1)  == HAL_REMAPTRIGGER_DAC1)       || \
                                  (((RMP) & HAL_REMAPTRIGGER_TIM1_ITR3)  == HAL_REMAPTRIGGER_TIM1_ITR3))

HAL_REMAPTRIGGER_DAC1 is not never defined, and I'm wondering if it's meant to be
HAL_REMAPTRIGGER_DAC1_TRIG which is defined:

#define HAL_REMAPTRIGGER_DAC1_TRIG         ((uint32_t)0x00000080)  /*!< DAC trigger remap (when TSEL = 001 on STM32F303xB/C and STM32F358xx devices)
                                                                        0: No remap (DAC trigger is TIM8_TRGO)
                                                                        1: Remap (DAC trigger is TIM3_TRGO) */


Has anyone seen this issue?

Outcomes