Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/30/06 22:23
Read: times


 
Msg Score: +1
 +1 Good Answer/Helpful
#108772 - the whole picture
Responding to: ???'s previous message
What is Out Status stage at Control-IN interrupt
How MCU can realize this status? Ignore it with some delay or another thing?
About The rightmost small pass:
What happens in this part:
It seems there isn't any task here!

The status stage is ZLP, either IN or OUT.
At the end of Control-IN transfer, host send ZLP to Control-OUT EP as the status stage. The rightmost small path on the flow chart (p11) handles this ZLP from the host. As this packet works only for confirmation, MCU has nothing to do other than setting "Control State" to USB_IDLE.

"Control State" in the flow chart means
USB_TRANSMIT- MCU is handling Control-IN transfer
USB_RECEIVE - MCU is handling Control-OUT transfer with data stage
USB_IDLE -    Control EPs are in idle state
               or MCU is handling Control-OUT transfer without data stage

As you see in the discussion so far, Control-IN and Control-OUT transfer are handled across both Control IN/OUT EP. This feature makes the story complicated.

OK, review once again. Now we can see the whole picture.
a) Control-IN transfer
- Transaction (packet) sequence:
    SETUP - IN - IN -...- IN - OUT
            (data stage)       (status stage)
- setup stage
   SETUP packet is received by Control-OUT EP
   This packet is handled by "Control Out Handler" - left main path
   MCU set "Control State" to USB_TRANSMIT
- data stage
   MCU interpret SETUP packet in mainloop, fill IN buffer with appropriate data
   IN transaction is received by Control-IN EP
   D12 returns a packet filled to IN buffer in the mainloop
   After sending the packet, "Control IN Handler" is called by interrupt
- status stage
   OUT packet (ZLP) is received by Control-OUT EP
   This packet is handled by "Control Out Handler" - rightmost small path
   MCU set "Control State" to USB_IDLE

a) Control-OUT transfer (with data stage)
- Transaction (packet) sequence:
    SETUP - OUT - OUT -...- OUT - IN
            (data stage)          (status stage)
- setup stage
   SETUP packet is received by Control-OUT EP
   This packet is handled by "Control Out Handler" - left main path
   MCU set "Control State" to USB_RECEIVE
- data stage
   MCU interpret SETUP packet in mainloop, prepare to receive data
   OUT packet is received by Control-OUT EP
   This packet is handled by "Control Out Handler" - center path
   When all data is received, MCU set "Control State" to USB_IDLE
   MCU handle the command told by host 
- status stage
   MCU set ZLP to Control-IN EP in mainloop
   IN transaction is received by Control-IN EP
   D12 returns ZLP
   After sending the packet, "Control IN Handler" is called by interrupt
   "Control IN Handler" return immediately, because "Control State" is USB_IDLE

a) Control-OUT transfer (without data stage)
- Transaction (packet) sequence:
    SETUP - IN
            (status stage)
- setup stage
   SETUP packet is received by Control-OUT EP
   This packet is handled by "Control Out Handler" - left main path
   MCU set "Control State" to USB_IDLE, because of no data
- status stage
   MCU interpret SETUP packet in mainloop, handle the command told by host 
   MCU set ZLP to Control-IN EP in mainloop
   IN transaction is received by Control-IN EP
   D12 returns ZLP
   After sending the packet, "Control IN Handler" is called by interrupt
   "Control IN Handler" return immediately, because "Control State" is USB_IDLE

Tsuneo

List of 88 messages in thread
TopicAuthorDate
USB Enumeration Process!!!            01/01/70 00:00      
   USB Design By Example            01/01/70 00:00      
      USB Design By Example            01/01/70 00:00      
         Hi.            01/01/70 00:00      
            Jan Axelson            01/01/70 00:00      
            Salaam            01/01/70 00:00      
               Salaam, Saalam and Thank you.            01/01/70 00:00      
                  fires            01/01/70 00:00      
                     It's out. All is well.            01/01/70 00:00      
                        weather            01/01/70 00:00      
                           Normal Weather            01/01/70 00:00      
                           good for you            01/01/70 00:00      
            D12!            01/01/70 00:00      
               Firmware Programming Guide for D12!            01/01/70 00:00      
                  I'll get back            01/01/70 00:00      
                     Thanks            01/01/70 00:00      
   I don't think you ever send descriptor .            01/01/70 00:00      
      Thanks            01/01/70 00:00      
         Descriptor IDs            01/01/70 00:00      
      But i think i must do!            01/01/70 00:00      
         Edit!            01/01/70 00:00      
            Main Loop            01/01/70 00:00      
               Try USB.org            01/01/70 00:00      
                  I don't know why d12 don't interrupted            01/01/70 00:00      
               I don't know why d12 don't interrupted            01/01/70 00:00      
                  I don't know why d12 don't interrupted            01/01/70 00:00      
                     I don't know why d12 don't interrupted            01/01/70 00:00      
                  Acknowledge setup?            01/01/70 00:00      
                     Thanks Tsuneo ,            01/01/70 00:00      
                        Sorry, I confused            01/01/70 00:00      
                           Sorry, I confused            01/01/70 00:00      
                              Just A Question!            01/01/70 00:00      
                                 It's OK, just for enumeration            01/01/70 00:00      
                                    Any error code on Control In EP?            01/01/70 00:00      
                                       Zero Length Packet !!!            01/01/70 00:00      
                                          ZLP??            01/01/70 00:00      
                                             ZLP??            01/01/70 00:00      
                                                ZLP itself is not the key            01/01/70 00:00      
                                                   the code to write the descriptor            01/01/70 00:00      
                                                      VALIDATE_BUFFER            01/01/70 00:00      
                                                         VALIDATE_BUFFER            01/01/70 00:00      
                                                            VALIDATE_BUFFER            01/01/70 00:00      
                                                               Not exactly            01/01/70 00:00      
                                                                  'Read buffer' and 'Write buffer'            01/01/70 00:00      
                                                                     'Read buffer' and 'Write buffer'            01/01/70 00:00      
                                                                        VALIDATE_BUFFER ?            01/01/70 00:00      
                                                                           VALIDATE_BUFFER ?            01/01/70 00:00      
                                                                              Your code            01/01/70 00:00      
                                                                                 Bulk Mail            01/01/70 00:00      
                                                                                    SEND_REQUESTED_DESCRIPTOR            01/01/70 00:00      
                                                                                       Incredible Progress            01/01/70 00:00      
                                                                                          ZLP on Control-IN            01/01/70 00:00      
                                                                                             Control IN and Control OUT transfer            01/01/70 00:00      
                                                                                                Thanks for your responses,            01/01/70 00:00      
                                                                                                   SET_ADDRESS            01/01/70 00:00      
                                                                                                      Some Questions...            01/01/70 00:00      
                                                                                                         SET_DESCRIPTOR            01/01/70 00:00      
                                                                                                            Control transfer            01/01/70 00:00      
                                                                                                               Control transfer            01/01/70 00:00      
                                                                                                                  the whole picture            01/01/70 00:00      
                                                                                                                     The Whole Picture,Thanks            01/01/70 00:00      
                                                                                                                        IN EP interrupt after sending packet            01/01/70 00:00      
                                                                                                                           Two USB communication procedure            01/01/70 00:00      
                                                                                                            comment...            01/01/70 00:00      
                                                                                             zlp!            01/01/70 00:00      
                                                                                             zlp!            01/01/70 00:00      
                                                         misunderstanding!            01/01/70 00:00      
   send an e-mail to your friendly local Ph            01/01/70 00:00      
   waiting for a techie, so I rummaged a bi            01/01/70 00:00      
   A Question?            01/01/70 00:00      
      declared in bMaxPacketSize            01/01/70 00:00      
   Source Code!            01/01/70 00:00      
      Source is Edited now!            01/01/70 00:00      
      Source is Edited!            01/01/70 00:00      
   D12 Example in "USB Design By Example"            01/01/70 00:00      
   Configuration Descriptor!            01/01/70 00:00      
      The 2nd Get_Descriptor            01/01/70 00:00      
         Thanks Tsuneo            01/01/70 00:00      
            Isn't it the config. desc. request?            01/01/70 00:00      
               Best For You Tsuneo !            01/01/70 00:00      
               Thanks            01/01/70 00:00      
      Strings            01/01/70 00:00      
         Thanks Thomas            01/01/70 00:00      
            Correction            01/01/70 00:00      
               USBView and UVCView            01/01/70 00:00      
               Thanks Thomas            01/01/70 00:00      
   Set DMA Mode!            01/01/70 00:00      
      It's optional            01/01/70 00:00      

Back to Subject List