X-CUBE-USB-AUDIO 资料篇⑥——USB音频播放初始化Init流程详解

一、流程

  • 1:接收USB设置配置控制请求(在插入或USB恢复后发生)
  • 2:请求从HAL驱动程序传输到USBD_Core
  • 3,4,5:USBD_Core设置配置
  • 6:USBD Audio CLASS初始化函数被调用。
  • 7,8:USBD Audio CLASShandler被分配 ,音频应用的初始化接口函数被调用
  • 9,10,11:播放会话已初始化,音频缓冲区已分配。USBD_AUDIO_FunctionDescriptionfTypeDef参数(初始化回调的第一个参数)设置为:
    • synch_enabled
    • synch_ep
    • SofReceived回调
    • SetAS_Alternate回调
  • 12:USB音频输入节点已初始化
  • 13:USB功能单元节点已初始化
  • 14, 15, 16:扬声器节点初始化,然后SAI初始化,编解码器初始化。零采样从备用缓冲器(扬声器节点)开始传输到SAI IP
  • 17, 18, 19:准备在握手阶段发送肯定状态

二、UML图

在这里插入图片描述

Host HAL USB Middleware USB Core Middleware USB Class Audi10 usbd_audio_if.c audio_usb_playback_session.c audio_usb_node.c audio_speaker_node.c BSP 1. Set Configuration 2. USBD_LL_SetupStage 3. USBD_StdDevReq 4. USBD_SetConfig 5. USBD_SetClassConfig 6. USBD_Audio_init 7. Allocate Audio Handle 8. Audio_USB_Init 9. AUDIO_PlaybackSessionInit 10. Allocate data buffer 11. Init session structure 12. USB AUDIO StreamingInputInit 13. USB AUDIO StreamingFeatureUnitInit 14. AUDIO_SpeakerInit 15. BSP_AUDIO_OUT_Init_Ext 16. BSP_AUDIO_OUT_Play 17. USBD_CtlSendStatus 18. USBD_LL_Transmit 19. Status ok Host HAL USB Middleware USB Core Middleware USB Class Audi10 usbd_audio_if.c audio_usb_playback_session.c audio_usb_node.c audio_speaker_node.c BSP

觉得好,就一键三连呗(点赞+收藏+关注)

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
V5.4.4完整版/2020年5月 STM32电机控制软件开发套件(MCSDK)- 完整源代码 主要变化: Version 5.4.4 is mostly a bug fix release of X-Cube-MCSDK v5.4.3. It also introduces some new feature. ◾Added Support for PFC on STM32F3. This support is added as an example for the STEVAL-CTM010V1 Dual motor demo board. ◾Atollic TrueSTUDIO & SW4STM32 Deprecation. Atollic TrueSTUDIO and SW4STM32 IDEs are no longer actively developed and ST's strategy is to replace them with STM32CubeIDE. Recent STM32 series like STM32G4 devices for instance, are already not supported by all these IDEs. In a near future release of the Motor Control SDK, support for these IDE will be dropped and it will not be possible anymore to generate a project for them from the Workbench. ◾Introduced a workaround for the issue with injected ADC conversions that exists on STM32G4xx Cut 2.2 devices. See the dedicated section below for more details. ◾Reintroduced the correct ST Motor Profiler version (the same as release 5.4.1 of the SDK). The Motor Profiler delivered with MCSDK 5.4.2 and 5.4.3 was incomplete. ◾Fixed an issue with the faulty setting of the maximum application current for the second drive in dual drive configurations ◾Fixed an issue with Position Control configurations using an absolute position encoder (with Z signal). ◾Fixed another issue with Position Control where a division by 0 was possible. ◾Fixed a bootstrap capacitor charge issue in ICS configurations ◾Fixed a SW Error that could occur during the offset measurement loop ◾Fixed a code generation issue resulting in a compilation error when enabling open loop. ◾Fixed a STM32H7 example compilation issue - missing files have been added. ◾Fixed a generation issue for some STM32G0 and STM32F0 devices where TIM2 does not exist but was referenced in the code anyway. This resulted in a compilation failure. ◾Fixed an issue with STM32F1 HD devices in single shunt configurations ◾In the workbench, the maximum PWM frequency can now be set as high as 500 KHz. ◾Fixed an issue due to the limited RShunt resolution. Now, values such as 0.00025 Ω are accepted. ◾Fixed an issue with NVIC configuration for IHM34V2 inverter boards. ◾Fixed a Workbench issue that resulted in a wrong pin assignment when creating new projects based on the NUCLEO-G431RB control board. See section Pin assignment with NUCLEO-G431RB for more details. ◾Fixed an issue that resulted in incorrect overcurrent settings with some power boards. See section Over current settings correction for some power boards ◾Enable users to select DAC channel 2 with STM32L452

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小康师兄

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值