Audio Weaver STM32F4, STM32F407 Setup Manual

STM32 F4xx Discovery Board
Setup Guide
Audio Weaver
DSP Concepts STM32F4xx Discovery Board Users Guide
Page: 2 of 13
Copyright Information
© 2014-2017 DSP Concepts, Inc., ALL RIGHTS RESERVED. This document may not be reproduced in any form without prior, express written consent from DSP Concepts, Inc.
Printed in the USA. Disclaimer
DSP Concepts, Inc reserves the right to change this product without prior notice. Information furnished by DSP Concepts is believed to be accurate and reliable. However, no responsibility is assumed by DSP Concepts for its use; nor for any infringement of patents or other rights of third parties which may result from its use. No license is granted by implication or otherwise under the patent rights of DSP Concepts, Inc.
Change Log
Version
Date
Description
Author
01
2017.Mar.16
Original document + TOC
AN
02
2017.May.15
Updated with new version information.
CHP
DSP Concepts STM32F4xx Discovery Board Users Guide
Page: 3 of 13
Table of Contents
Overview 4 Features 4 Setup 5 Connecting Audio Weaver to the Target 9 Using GPIO Inputs and Outputs 12
DSP Concepts STM32F4xx Discovery Board Users Guide
Page: 4 of 13
Overview
This document describes how to use Audio Weaver with the STM32F407 Discovery board. This is a low cost evaluation board for the STM32F4 series of Cortex-M4 processors.
Features
Audio I/O: 2-in USB. mono-Mic. 2 out via DAC. @ 48 kHz CPU clock speed 84 MHz (STM32F401) 168 MHz (STM32F407) Tuning interface: USB HID device Flash file system support: Yes Booting from flash: Yes Fundamental block size: 32 samples Native data type: Floating-point
DSP Concepts STM32F4xx Discovery Board Users Guide
Page: 5 of 13
Setup
First, download the ST Board Support Package (BSP) for the appropriate target. These BSPs are provided on the DSP Concepts website at: https://www.dspconcepts.com. After running the installer and accepting the licensing agreement, the BSP will be installed to a directory in C:\DSP Concepts.
Once BSP software is installed on your computer, connect the ST Discovery board to your computer. The board has two USB connections:
Mini-USB – for power and programming
Micro-USB – for audio and control
NOTE: Charge-only USB cables will not work. If you are having trouble flashing or connecting to the board, make sure that your USB cables support data transfer. A common symptom of a bad cable is an error message while attempting to connect that reads Unable to create USB port - is this port in use by another program?".
Connect both USB connections to your PC. This will power on the board and several LEDs will light.
Next, install the STM32 ST-LINK Utility (STSW-LINK004) programming utility provided by STMicroelectronics on their website (www.st.com).
http://www.st.com/content/st_com/en/products/embedded-software/development-tool­software/stsw-link004.html
DSP Concepts STM32F4xx Discovery Board Users Guide
Page: 6 of 13
After installation, start the utility and the following window will appear:
From the toolbar, click on the
button to connect to the target. After a few seconds, the window will update to:
DSP Concepts STM32F4xx Discovery Board Users Guide
Page: 7 of 13
Click on the “Full Chip Erase” button to completely erase the flash contents.
Then Click on the “Program and Verify” button:
Then browse and select a binary loader file to program.
<BSP-Folder>/Bin/STM32F407_Discovery.bin
You’ll then advance to the next window.
Click the “Start” button to begin updating the flash memory.
DSP Concepts STM32F4xx Discovery Board Users Guide
Page: 8 of 13
After a few seconds, the programming operation will complete.
If the firmware image update was successful you should now see LED4 flashing green.
The board should now appear as two new USB devices and driver installation should happen automatically on Windows 7 and Windows 8. That is, the board uses default Windows drivers. No special drivers need to be installed1.
The board appears as a USB audio device. Select this under your Windows audio playback device settings. On Windows 10, it appears as:
1
Windows XP is currently not supported.
DSP Concepts STM32F4xx Discovery Board Users Guide
Page: 9 of 13
Connecting Audio Weaver to the Target
Launch Audio Weaver Designer application. Then from the Server Window (not from the Designer window) select the menu item Target→Change Connection
In the drop list select “USB” and change the PID and VID settings if necessary as shown below
For the STM32F407 board
Click on the “Change” button. This window will dismiss and the Server window will
update to reflect the connection to the Discovery board.
DSP Concepts STM32F4xx Discovery Board Users Guide
Page: 10 of 13
For the STM32F407 Discovery board, the following information should now be displayed in AWE_Server.
At this point the Audio Weaver Server is able to communicate with the board. To make
sure that the Audio Weaver Designer also sees this change, click on the “Reconnect to
Server” button :
The default system drawn in Audio Weaver Designer is shown below.
The target has a fundamental block size of 32 samples and operates at a fixed sample rate of 48 kHz. The left input pin ‘SYS_in’ indicates 3 channels of input. The first two channels are stereo USB audio and this is the audio which is streaming from the PC. The
DSP Concepts STM32F4xx Discovery Board Users Guide
Page: 11 of 13
last channel is the mono mic. The right output pin ‘SYS_out’ is also stereo and this is the audio being output to the DAC. Real-time processing will only happen once an Audio Weaver model is running.
Create and run a simple model in Audio Weaver and plug in speakers to the STM32
Discovery board’s 3.5 mm audio output jack. You should now hear audio being rendered
by the STM32 Discovery board!
DSP Concepts STM32F4xx Discovery Board Users Guide
Page: 12 of 13
Using GPIO Inputs and Outputs
The Discovery boards have a variety of LEDs, I/O pins, and a blue user button. Audio Weaver has a GPIO block that allows either output to a GPIO pin or led or input from a GPIO pin or the blue user button. However, the block has to be setup to access the desired pin. Each pin and led on the board is labelled. The GPIO block numbers pins starting with pin 1 and these need to be mapped to the actual pins on the board.
STM32F407VG-Discovery Board Available GPIO Pin Map
GPIO Block
Pin Number
Board Input Pin
Name
Board Output Pin
Name
1
Blue User Button
LED6
2
PA1
LED3
3
PA2
LED5
4
PA3
PA1
5
PA8
PA2
6
PA15
PA3
7
PB0
PA8
8
PB1
PA15
9
PB4
PB0
10
PB5
PB1
11
PB7
PB4
12
PB8
PB5
13
PB11
PB7
14
PB12
PB8
15
PB13
PB11
16
PB14
PB12
17
PB15
PB13
18
PC1
PB14
19
PC2
PB15
20
PC4
PC1
21
PC5
PC2
22
PC6
PC4
23
PC8
PC5
24
PC9
PC6
25
PC11
PC8
26
PC13
PC9
27
PC14
PC11
28
PC15
PC13
29
PD0
PC14
30
PD1
PC15
31
PD2
PD0
32
PD3
PD1
33
PD6
PD2
DSP Concepts STM32F4xx Discovery Board Users Guide
Page: 13 of 13
34
PD7
PD3
35
PD8
PD6
36
PD9
PD7
37
PD10
PD8
38
PD11
PD9
39
PE2
PD10
40
PE4
PD11
41
PE5
PE2
42
PE6
PE4
43
PE7
PE5
44
PE8
PE6
45
PE9
PE7
46
PE10
PE8
47
PE11
PE9
48
PE12
PE10
49
PE13
PE11
50
PE14
PE12
51
PE15
PE13
52
PE14
53
PE15
Loading...