Search code examples
c++keilmbed

Keil / Nucleo - 'unknown type name' despite type being defines (I think)


Im trying to generate analog signal with Nucleo RF411, started with https://developer.mbed.org/handbook/AnalogIn demo (I wanna use ADC to check if/how DCA is working), AnalogIn seems to be working just fine - Im getting some data. But I can't seem to set data - AnalogOut is unknown. According to screenshot both AnalogIn.h and AnalogOut.h are linked (or so I think), but only AnalogIn works.

What am I missing?

EDIT - I've tried downloading and compiling AnalogOut example, it doesnt seem to work either - https://developer.mbed.org/handbook/AnalogOut Ive exported it into Keil, and something is wrong with AnalogOut method still. As if some library was missing or whatnot.


Solution

  • I think your board is Nucleo F411RE, which, unfortunately, does not have a DAC; the AnalogOut specifically mention that a DAC output pin is not available everywhere. The Nucleo F410 board has such DAC. To see the data from ADC, you may use the STLink connection, present on your board and just printf to a terminal, or set a breakpoint in your code and examine the conversion result. One mention: if you do not have a DAC, you may attach such device externally. Another alternative solution is to use a PWM output pin, with the expense of two components, a Resistor and Capacitor, to form a filter. PWM can be either a such module in your micro or a timer with PWM capability.