cancel
Showing results for 
Search instead for 
Did you mean: 

How to modify the size of Endpoint1 by CubeMx

hzt1234hf
Associate
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.
1 REPLY 1
stm32cube-t
Senior III
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;

 }