打印
[STM32F1]

SD卡模拟U盘,一直进入NOP_PROCESS

[复制链接]
856|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
z1234zz|  楼主 | 2015-11-4 09:44 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我想使用STM32F103V系列,想使用SD卡来模拟U盘,现在USB,从**看是进入了Mass_Storage_GetConfiguration,这个函数就是没有定义,D+没有上位,但是我用万用表测量,上拉电阻已经有高电平了3V

sb GPIO Init suc
usb Enable D+ suc
usb interrupt config suc
usb Disable D+ suc
usb MASS_init power off
usb Enable D+ suc
usb MASS_Reset set basic address 0x00
usb MASS_Reset Init endpoint suc
usb USB_Istr Reset
usb USB_Istr Suspend
usb MASS_init power on
usb NOP_Process Mass_Storage_GetConfiguration
usb NOP_Process Mass_Storage_GetConfiguration
usb NOP_Process Mass_Storage_GetConfiguration
usb NOP_Process Mass_Storage_GetConfiguration
usb NOP_Process Mass_Storage_GetConfigurausb MASS_Reset set basic address 0x00
usb MASS_Reset Init endpoint suc
usb USB_Istr Reset
tion
usb NOP_Process Mass_Storage_GetConfiguration
usb NOP_Process Mass_usb Setup0_Process bmRequestType 8
0
usb Setup0_Process bRequest 6
usb Setup0_Process wValue 1
usb Setup0_Process wIndex 0
usb Setup0_Process wLength 40
usb Setup0_Process Data_Setup0 1
usb Data_Setup0 GetDeviceDescriptor
usb MASS_GetDeviceDescriptor
usb MASS_GetDeviceDescriptor
usb USB_Istr CTR_LP
usb USB_Istr CTR_LP
可以获取设备描述符
Storage_GetConfiguration
usb NOP_Process Mass_Storage_GetConfiguration
usb NOP_Process Mass_Storage_GetConfiguration
usb NOP_Process Mass_Storage_GetConfiguration
usb NOP_Process Mass_Storage_GetConfiguration
usb NOP_Process Mass_Storage_GetConfiguration
usb NOP_Process Mass_Storage_GetConfiguration


usb MASS_Reset set basic address 0x00
usb MASS_Reset Init endpoint suc
usb USB_Istr Reset
uration
usb NOP_Process Mass_Storage_GetConfiguration
usb NOP_Proceusb Setup0_Process bmRequestType 0
usb Setup0_Process bRequest 5
usb Setup0_Process wValue 1a00
usb Setup0_Process wIndex 0
usb Setup0_Process wLength 0
usb USB_Istr CTR_LP
usb In0_Process SetDeviceAddress 1a
usb USB_Istr CTR_LP
ss Mass_Storage_GetConfigurusb Setup0_Proc
ess bmRequestType 80
usb Setup0_Process bRequest 6
usb Setup0_Process wValue 1
usb Setup0_Process wIndex 0
usb Setup0_Process wLength 12
usb Setup0_Process Data_Setup0 2
usb Data_Setup0 GetDeviceDescriptor
usb MASS_GetDeviceDescriptor
usb MASS_GetDeviceDescriptor
usb USB_Istr CTR_LP
usb USB_Istr CTR_LP
ation
usb NOP_Process Mass_Storage_GetConfiguration
usb NOP_Process Mass_Storage_GetConfiguration
usb NOP_Process Mass_Storage_GetConfiguration
usb NOP_Process Mass_Storage_GetConfiguration
usb NOP_Process Mass_Storage_GetConfiguration
usb NOP_Process Mass_Storage_GetConfiguration
usb NOP_Process Mass_Storage_GetConfiguration
可以配置地址,下面进入获取配置描述符失败
MASS_init这个函数中
一直进入usb NOP_Process Mass_Storage_GetConfiguration
  /* Wait until device is configured */
  while (pInformation->Current_Configuration == 0)
  {
    NOP_Process();/*表明D+没有上拉电阻,或者没有插入USB线*/
  }
  bDeviceState = CONFIGURED;
}
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

5

主题

28

帖子

1

粉丝