/**
@page AUDIO_Standalone USB Device AUDIO example
@verbatim
******************** (C) COPYRIGHT 2015 STMicroelectronics *******************
* @file USB_Device/AUDIO_Standalone/readme.txt
* @author MCD Application Team
* @version V1.2.0
* @date 19-June-2015
* @brief Description of the USB Device AUDIO example.
******************************************************************************
*
* Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.st.com/software_license_agreement_liberty_v2
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
******************************************************************************
@endverbatim
@par Example Description
This application shows how to use the implementation of the audio streaming (Out: Speaker/Headset)
capability.
It follows the "Universal Serial Bus Device Class Definition for Audio Devices Release 1.0 March 18,
1998" defined by the USB Implementers Forum for reprogramming an application through USB-FS-Device.
Following this specification, it is possible to manage only Full Speed USB mode (High Speed is not supported).
This class is natively supported by most Operating Systems: no need for specific driver setup.
This is a typical example on how to use the STM32F3xx USB Device peripheral and SAI peripheral to
stream audio data from USB Host to the audio codec implemented on the STM32373C-EVAL board.
At the beginning of the main program the HAL_Init() function is called to reset all the peripherals,
initialize the Flash interface and the systick. The user is provided with the SystemClock_Config()
function to configure the system clock (SYSCLK) to run at 72 MHz. The Full Speed (FS) USB module uses
internally a 48-MHz clock, which is generated from an integrated PLL.
The device supports the following audio features:
- Pulse Coded Modulation (PCM) format
- sampling rate: 48KHz.
- Bit resolution: 16
- Number of channels: 2
- No volume control
- Mute/Unmute capability
- Asynchronous Endpoints
In order to overcome the difference between USB clock domain and STM32 clock domain,
the Add-Remove mechanism is implemented at class driver level.
This is a basic solution that doesn't require external components. It is based
on adding/removing one sample at a periodic basis to speedup or slowdown
the audio output process. This allows to resynchronize it with the input flow.
@note Care must be taken when using HAL_Delay(), this function provides accurate delay (in milliseconds)
based on variable incremented in SysTick ISR. This implies that if HAL_Delay() is called from
a peripheral ISR process, then the SysTick interrupt must have higher priority (numerically lower)
than the peripheral interrupt. Otherwise the caller ISR process will be blocked.
To change the SysTick interrupt priority you have to use HAL_NVIC_SetPriority() function.
@note The application need to ensure that the SysTick time base is always set to 1 millisecond
to have correct HAL operation.
It is possible to remappe the USB interrupts (USB_LP and USB_WKUP) on interrupt lines 75 and 76.
User can select USB line Interrupt through macro defined in main.h.
(USE_USB_INTERRUPT_DEFAULT and USE_USB_INTERRUPT_REMAPPED)
@note To reduce the example footprint, the toolchain dynamic allocation is replaced by a static allocation
by returning the address of a pre-defined static buffer with the HID class structure size.
It is possible to fine tune needed USB Device features by modifying defines values in USBD configuration
file �usbd_conf.h� available under the project includes directory, in a way to fit the application
requirements, such as:
- USBD_AUDIO_FREQ, specifing the sampling rate conversion from original audio file sampling rate to the
sampling rate supported by the device.
@par Directory contents
- USB_Device/AUDIO_Standalone/Src/main.c Main program
- USB_Device/AUDIO_Standalone/Src/system_stm32f3xx.c STM32F3xx system clock configuration file
- USB_Device/AUDIO_Standalone/Src/stm32f3xx_it.c Interrupt handlers
- USB_Device/AUDIO_Standalone/Src/usbd_audio_if.c USBD Audio interface
- USB_Device/AUDIO_Standalone/Src/usbd_conf.c General low level driver configuration
- USB_Device/AUDIO_Standalone/Src/usbd_desc.c USB device AUDIO descriptor
- USB_Device/AUDIO_Standalone/Inc/main.h Main program header file
- USB_Device/AUDIO_Standalone/Inc/stm32f3xx_it.h Interrupt handlers header file
- USB_Device/AUDIO_Standalone/Inc/stm32f3xx_hal_conf.h HAL configuration file
- USB_Device/AUDIO_Standalone/Inc/usbd_conf.h USB device driver Configuration file
- USB_Device/AUDIO_Standalone/Inc/usbd_desc.h USB device AUDIO descriptor header file
- USB_Device/AUDIO_Standalone/Inc/usbd_audio_if.h USBD Audio interface header file
@par Hardware and Software environment
- This example runs on STM32F373xx devices.
- This example has been tested with STMicroelectronics STM32373C-EVAL RevC
evaluation boards and can be easily tailored to any other supported device
and development board.
- STM32373C-EVAL RevC Set-up
- Connect the STM32373C-EVAL board to the PC for audio streaming through
'USB A-Male to A-Male' cable to the connector
- Use CN21 connector to connect the board to external headset
@par How to use it ?
In order to make the program work, you must do the following:
- Open your preferred toolchain
- Rebuild all files and load your image into target memory
- Run the example
- Open an audio player application (Windows Media Player) and play music on the PC host
* <h3><center>© COPYRIGHT STMicroelectronics</center></h3>
*/
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
STM32_UVC示例 (277个子文件)
libarm_cortexM3l_math.a 3.1MB
stm32f1xx_hal_tim.c 166KB
stm32f1xx_hal_i2c.c 122KB
stm32f1xx_hal_sd.c 108KB
stm32f1xx_hal_adc.c 81KB
stm32f1xx_hal_spi.c 78KB
stm32f1xx_hal_eth.c 72KB
stm32f1xx_hal_usart.c 65KB
stm32f1xx_ll_usb.c 64KB
stm32f1xx_hal_uart.c 63KB
stm32f1xx_hal_tim_ex.c 63KB
stm32f1xx_hal_adc_ex.c 54KB
stm32f1xx_hal_rtc.c 53KB
stm32f1xx_hal_irda.c 52KB
stm32f1xx_hal_rcc.c 50KB
stm32f1xx_hal_i2s.c 49KB
stm32f1xx_hal_can.c 47KB
stm32f1xx_hal_smartcard.c 46KB
jpeg.c 46KB
stm32f1xx_hal_pcd.c 40KB
stm32f1xx_ll_fsmc.c 38KB
stm32f1xx_hal_flash_ex.c 37KB
stm32f1xx_hal_nand.c 37KB
stm32f1xx_hal_hcd.c 35KB
stm32f1xx_hal_nor.c 34KB
stm32f1xx_hal_dac.c 33KB
stm32f1xx_hal_cec.c 32KB
stm32f1xx_hal_rcc_ex.c 31KB
usbd_dfu.c 31KB
stm32f1xx_hal_flash.c 31KB
usbd_cdc.c 29KB
stm32f1xx_hal_dac_ex.c 25KB
usbd_audio.c 25KB
stm32f1xx_hal_pccard.c 24KB
usbd_uvc.c 24KB
stm32f1xx_hal_dma.c 24KB
stm32f1xx_hal_sram.c 23KB
stm32f1xx_hal_gpio.c 22KB
stm32f1xx_hal_pwr.c 22KB
stm32f1xx_hal_cortex.c 21KB
usbd_msc_scsi.c 20KB
stm32f1xx_hal.c 19KB
stm32f1xx_ll_sdmmc.c 18KB
usbd_ctlreq.c 18KB
stm32f1xx_hal_rtc_ex.c 17KB
stm32f1xx_hal_wwdg.c 16KB
usbd_msc.c 16KB
system_stm32f1xx.c 16KB
usbd_customhid.c 16KB
usbd_hid.c 14KB
usbd_conf.c 13KB
stm32f1xx_hal_iwdg.c 13KB
usbd_core.c 12KB
stm32f1xx_hal_crc.c 11KB
usbd_msc_bot.c 10KB
usbd_template.c 10KB
stm32f1xx_hal_spi_ex.c 9KB
usbd_desc.c 9KB
stm32f1xx_hal_pcd_ex.c 9KB
usbd_msc_storage_template.c 6KB
usbd_conf_template.c 6KB
main.c 6KB
usbd_ioreq.c 6KB
usbd_uvc_if_template.c 6KB
usbd_cdc_if_template.c 6KB
stm32f103_demo.c 6KB
stm32f1xx_hal_gpio_ex.c 5KB
stm32f1xx_it.c 5KB
usbd_audio_if_template.c 5KB
usbd_dfu_media_template.c 4KB
stm32f1xx_hal_msp_template.c 4KB
usbd_customhid_if_template.c 3KB
usbd_uvc_if.c 3KB
usbd_msc_data.c 2KB
stm32f107xc.h 613KB
stm32f105xc.h 577KB
stm32f103xg.h 502KB
stm32f103xe.h 495KB
stm32f103xb.h 442KB
stm32f103x6.h 436KB
stm32f101xg.h 321KB
stm32f102xb.h 320KB
stm32f102x6.h 314KB
stm32f100xe.h 312KB
stm32f101xe.h 311KB
stm32f100xb.h 285KB
stm32f101xb.h 264KB
stm32f101x6.h 258KB
arm_math.h 246KB
stm32_hal_legacy.h 162KB
core_cm7.h 135KB
core_cm4.h 112KB
stm32f1xx_hal_eth.h 103KB
core_cm3.h 101KB
stm32f1xx_hal_rcc_ex.h 101KB
core_sc300.h 100KB
stm32f1xx_hal_tim.h 80KB
stm32f1xx_hal_rcc.h 69KB
stm32f1xx_hal_adc.h 51KB
stm32f1xx_hal_adc_ex.h 48KB
共 277 条
- 1
- 2
- 3
anobodykey
- 粉丝: 465
- 资源: 21
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 549springboot + vue 民宿管理平台.zip (可运行源码+数据库文件+文档)
- ZArchiver.Pro_0.9.5.apk
- vmware环境配置.mp4
- 548springboot + vue 大学生社团活动平台.zip(可运行源码+数据库文件+文档)
- 微信小程序 辩论倒计时小程序源码 作业设计demo 计算机专业参考
- 深入探究文件IO,嵌入式Linux
- 微信备忘录小程序源码 作业设计demo 计算机专业作业
- 微信小程序 仿百度小说小程序 看小说小程序 实现源码
- 锂电资料包-锂离子电池技术干货资料合集.zip
- (王道计算机组成原理)第三章存储系统-第二节1:主存储器基本构成、基本的半导体原件和存储器芯片的原理_主存储器与存储芯片-CSDN博客 (2024….html
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
前往页