5 years, 4 months ago.

I cannot run Nucleo_Ex02_DAC example in my NUCLEO-F411RE board

I am accustomed to arduino world, where there is only one board for everyhting. I am interested in doing audio related projects, so I decided to move into ARM. I bought this NUCLEO-F411RE some time ago, and so far I haven't been able to go beyond blinking a led. Every example file I try to import into the compiler with the intention of learning produces a different compiler error that I don't understand. My final intention is loading a sound from SD card, modifying it sample by sample, and playing the modified version back.

In this particular case, I am trying to run this (https://os.mbed.com/users/beaglescout007/code/Nucleo_Ex02_DAC/) example from the online IDE. I expected to get familiar with the bare bones of PWM synthesis.

The compiler error is: N 20, Identifier "AnalogOut" is undefined; line 6.

1 Answer

5 years, 3 months ago.

Joaquin -

The demo code you are running uses one of the Nucleo F446RE's hardware DAC channels. Your Nucleo F411RE does not have a hardware DAC, so "AnalogOut" is not defined for your board. You can verify this by changing the target board to the Nucleo F446RE and I think the code will compile.

You can experiment with PWM synthesis using the example in the "Pulse width modulation" chapter of the mbed cookbook Course Notes found here:

https://os.mbed.com/cookbook/Course-Notes

You may also want to check out this Arm University presentation that discusses using a Wolfson audio card and an STM F4 Discovery card:

https://www.youtube.com/watch?v=TO66UN64-os

The companion book can be bought from Amazon

https://www.amazon.com/Digital-Signal-Processing-Using-Cortex-ebook/dp/B015Q0RAIS

JR