Why my stm32 can not transfer data through usb ep1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2009-08-29 7:22 AM
Posted on August 29, 2009 at 16:22
Why my stm32 can not transfer data through usb ep1
This discussion is locked. Please start a new topic to ask your question.
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 4:22 AM
Posted on May 17, 2011 at 13:22
if i set the ep1 to tx_valid in reset function in usb_prop.c,then it can tranfer,but if i set tx_valid in main,the ep1 always respond with NAK.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 4:22 AM
Posted on May 17, 2011 at 13:22
Hi cgha21,
This is because each time an USB reset is detected on the USB bus, a USB reset (RESET interrupt) event occurs and in USB peripheral : the communication is disabled in all endpoint registers (the USB peripheral will not respond to any packet). As a response to the USB reset event, the USB function must be enabled, having as USB address 0, implementing only the default control endpoint (endpoint address is 0 too). This is accomplished by setting the Enable Function (EF) bit of the USB_DADDR register and initializing the EP0R register and its related packet buffers accordingly. During USB enumeration process, the host assigns a unique address to this device, which must be written in the ADD[6:0] bits of the USB_DADDR register, and configures any other necessary endpoint. Cheers, STOne-32.