This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

EK-STM32F Keil example using endpoint2

Hi,

if tested the KEIL USB-HID example for the EK-STM32F. It is working!

But when I change the endpoint IN from 1 to 2 -> it seems that the device will never get any interrupts which should call the void USB_EndPoint2 (U32 event) function.

Do someone know which additional changes I have to do? I've only add the endpoint2 interrupt to USB_EP_EVENT.

best regards
Jeeremie

Parents
  • Hi Jeremie Quolage,

    Please see this thread:

    http://www.keil.com/forum/docs/thread15613.asp

    Author: Tsuneo Chinzei
    Posted: 24-Sep-2009 17:48 GMT
    Toolset: ARM

    USB_Configure_Event() is called when Set_Configuration request comes from host on enumeration. In this routine, an input report is loaded to the EP1 IN buffer using USB_WriteEP(). This report is the first one. When host starts to repeat IN transactions just after enumeration, this report is sent to the host. And then, USB interrupt occurs at the IN EP1.

    On this interrupt, USB_EndPoint1() is called.
    This routine fills the endpoint buffer with a report using USB_WriteEP().
    This report is sent to host at the next IN transaction after the specified interval (bInterval).
    Another endpoint interrupt occurs, and USB_EndPoint1() is called again.

    In this way, USB_EndPoint1() is called repeatedly, at bInterval.

    If you put nothing to the endpoint buffer in USB_EndPoint1(), what happens?
    No report is sent to the host, and no endpoint interrupt occurs.
    The sequence stops, USB_EndPoint1() is never called any more,
    until you fill the endpoint buffer with USB_WriteEP().

    I suppose this is your story, isn't it?

Reply
  • Hi Jeremie Quolage,

    Please see this thread:

    http://www.keil.com/forum/docs/thread15613.asp

    Author: Tsuneo Chinzei
    Posted: 24-Sep-2009 17:48 GMT
    Toolset: ARM

    USB_Configure_Event() is called when Set_Configuration request comes from host on enumeration. In this routine, an input report is loaded to the EP1 IN buffer using USB_WriteEP(). This report is the first one. When host starts to repeat IN transactions just after enumeration, this report is sent to the host. And then, USB interrupt occurs at the IN EP1.

    On this interrupt, USB_EndPoint1() is called.
    This routine fills the endpoint buffer with a report using USB_WriteEP().
    This report is sent to host at the next IN transaction after the specified interval (bInterval).
    Another endpoint interrupt occurs, and USB_EndPoint1() is called again.

    In this way, USB_EndPoint1() is called repeatedly, at bInterval.

    If you put nothing to the endpoint buffer in USB_EndPoint1(), what happens?
    No report is sent to the host, and no endpoint interrupt occurs.
    The sequence stops, USB_EndPoint1() is never called any more,
    until you fill the endpoint buffer with USB_WriteEP().

    I suppose this is your story, isn't it?

Children
No data