2 years, 7 months ago.

how to use AnalogOut

Identifier AnalogOut is undefined

Question relating to:

Affordable and flexible platform to ease prototyping using a STM32F401RET6 microcontroller.

2 Answers

2 years, 7 months ago.

The AnalogOut class only applies to microcontrollers with internal DACs.

Nucleo-F401RE does not have a DAC. Therefore, this class can not be used.

Accepted Answer

Hello, The above answer is correct. STM32F401RE does not have a DAC, and is not compiled for the class ANALOGOUT. You may chose another platform.

You can find the list of STM32 devices that have a DAC in this document : http://www.st.com/content/ccc/resource/technical/document/application_note/05/fb/41/91/39/02/4d/1e/CD00259245.pdf/files/CD00259245.pdf/jcr:content/translations/en.CD00259245.pdf (table 2)

and you can find the list of ST platforms available in mbed here : https://developer.mbed.org/platforms/?pvend=10

kind regards Armelle

posted by Armelle DubocST 28 Jul 2017
2 years, 7 months ago.

make sure you have a Library included which links to the api.

check the api again :


Try to import that into your online IDE and play with it.

Make sure the syntax is AnalogOut variable(Pin);

the api will store the value of the variable named variable, or any other name, in its logical equivalent to the Pin.

Not every Pin can be an AnalogOut!

You need to set a porper value for Pin, it's just a placeholder for a numeric value that defines the Pin number.

i.e A5 means Register A Pin 5, like in the API example.