Skip to main content
hzt1234hf
Visitor II
August 19, 2016
Question

How to modify the size of Endpoint1 by CubeMx

  • August 19, 2016
  • 1 reply
  • 1106 views
Posted on August 19, 2016 at 08:54

Hi,

i created a USB-CustomHID project use CubeMx, but i can't find any way to change the size of Endpoint1(not Endpoint 0).

0690X00000602cVQAQ.jpg

0690X00000602caQAA.jpg

Are there any ideas for my problem?

Thanks.
    This topic has been closed for replies.

    1 reply

    stm32cube-t
    ST Employee
    September 20, 2016
    Posted on September 20, 2016 at 17:17

    Dear user,

    This parameter is fixed within the HAL driver in the HAL_PCD_Init function - see code extract below:

    /* Init endpoints structures */

     for (i = 0U; i < 15U; i++)

     {

       /* Init ep structure */

       hpcd->IN_ep[i].is_in = 1U;

       hpcd->IN_ep[i].num = i;

       hpcd->IN_ep[i].tx_fifo_num = i;

       /* Control until ep is activated */

       hpcd->IN_ep[i].type = EP_TYPE_CTRL;

       hpcd->IN_ep[i].maxpacket = 0U;

       hpcd->IN_ep[i].xfer_buff = 0U;

       hpcd->IN_ep[i].xfer_len = 0U;

     }