[应用相关] usb音频功能的问题

[复制链接]
2672|2
 楼主| dkill 发表于 2008-7-10 16:51 | 显示全部楼层 |阅读模式
做usb音频功放的例子:(usb例程)
  不解的问题:
    想知道是怎么实现采样一致的,在发送端以22khz的频率中断接受数据,但是不解的是usb接受的也应该是相同采样下来的吗  还是?
 楼主| dkill 发表于 2008-7-10 19:03 | 显示全部楼层

pbUsrBuf++;

void PMAToUserBufferCopy(u8 *pbUsrBuf, u16 wPMABufAddr, u16 wNBytes)
{
  u32 n = (wNBytes + 1) >> 1;/* /2*/
  u32 i;
  u32 *pdwVal;
  pdwVal = (u32 *)(wPMABufAddr * 2 + PMAAddr);
  for (i = n; i != 0; i--)
  {
    *(u16*)pbUsrBuf++ = *pdwVal++;
    pbUsrBuf++;
  }
}
为什么pbUsrBuf++;还要加一
香水城 发表于 2008-7-10 21:34 | 显示全部楼层

20.5.3 Buffer descriptor table

Although the buffer descriptor table is located inside the packet buffer memory, its entries can be considered as additional registers used to configure the location and size of the packet buffers used to exchange data between the USB macro cell and the STM32F10xxx. Due to the common APB bridge limitation on word addressability, all packet memory locations are accessed by the APB using 32-bit aligned addresses, instead of the actual memory location addresses utilized by the USB peripheral for the USB_BTABLE register and buffer description table locations.
相关链接:http://www.st.com/stonline/products/literature/rm/13902.pdf
您需要登录后才可以回帖 登录 | 注册

本版积分规则

62

主题

201

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部