Error in stm32f4xx_hal_dac.h with nucleo F411RE ?

29 Jun 2015

Hey guys!

I recently changed from a Nucleo F334R8 to a F411RE. When uploading my code to the new board, and after selecting my new platform on the mbed compiler, I got the following error : "Error: Identifier "DAC_HandleTypeDef" is undefined in "main.cpp", Line: 52, Col: 2"

I checked into the stm32f4xx_hal_dac.h file and the structure is well defined but I noticed the following condition, that I guess is preventing the code to be executed on my platform :

weird condition

#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) ||\
    defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) ||\
    defined(STM32F446xx)

Does it mean that the HAL functions are only accessible to these particular STM32?

29 Jun 2015

Okay my bad, the F411RE simply does not have onboard DAC...

Sorry for the dumb topic