2014-09-07 11:46 PM
I downloaded STM32CubeF4 package here, and I can't find a USB Speaker (or USB Audio Standalone) application at:
STM32Cube_FW_F4_V1.3.0\Projects\STM32F4-Discovery
So what I did was use:
STM32Cube_FW_F4_V1.3.0\Projects\STM324xG_EVAL\Applications\USB_Device\AUDIO_Standalone
... as reference, since it's meant to be tailored among STM32F407x/STM32F417x devices and it is configured to use the same CS43L22 DAC which the STM32F4Discovery uses.
Basically, I want STM32F4Discovery to act as a USB Speaker when it's connected to a Host PC, by having this audio flow:
[PC] --USB Device IN--> [STM32F407x] --I2S OUT--> [CS43L22 DAC] --DAC--> earphones (via CN4)
I just did the following changes:
Step 1. At General Options' Target Device in Project Options, replace:
- ST STM32F407IG
+ ST STM32F407VG
Step 2. Applied this change in main.c
- RCC_OscInit.PLL.PLLM = 25;
+ RCC_OscInit.PLL.PLLM = 8;
RCC_OscInit.PLL.PLLN = 336;
- RCC_OscInit.PLL.PLLP = 2;
+ RCC_OscInit.PLL.PLLP = RCC_PLLP_DIV2;
Step 3. At Drivers/BSP in Project Explorer, replace:
- ''STM324xG_EVAL'' drivers (stm324xg_eval.c, stm324xg_eval_audio.c)
+ ''STM32F4-Discovery'' drivers (stm32f4_discovery.c, stm32f4_discovery_audio.c)
Step 4. At C/C++ Compiler's Preprocessor in Project Options, replace:
- define of USE_STM324xG_EVAL and include directory $PROJ_DIR$\..\..\..\..\..\..\Drivers\BSP\STM324xG_EVAL
+ define of USE_STM32F4_DISCO and include directory $PROJ_DIR$\..\..\..\..\..\..\Drivers\BSP\STM32F4-Discovery
Step 5. Changed all LED references from LED 1-4 to LED 3-6 instead.
Note:
I retained usage of the following, since these should be the same regardless of whether STM32F4Discovery or STM324xG_EVAL board is used:
2014-09-11 11:15 AM
Hi,
what about USB Mic example for Disco board?Not to store to flash, but transfer to host PC.2014-09-12 01:38 AM
Hi kufaev.sergey,
Unfortunately no such application is available now at any STM32FW package. We’ll pass along your suggestion to our developpment team.Thank you.2015-04-13 08:13 AM
Dear all, I have tried to download this MX project on my discovery board but, when I connect the board to the PC is not recognized (Unknown Device).
Do you have a recent project and/or a specific documentation how to implement Audio Class through CubeMX?2015-04-14 05:00 AM
Dear Maggie, could you please post the working project?
Thanks in advance2016-06-02 02:29 AM
Could you guys post again the modified files and project. Or maybe answer whether did the development team include the modifications to standard libarary after that?
2016-06-02 09:51 AM
2016-06-02 09:55 AM
I use FW 1.12