AnsweredAssumed Answered

USB High Speed

Question asked by Alexander Skupov on Jan 25, 2018
Latest reply on Feb 9, 2018 by Rick Sladkey

Hi all

I'm using stm32f745  with the CubeMX USB OTG Host library

I constantly send requests to another device.

But at one point I take one zeros

 

If you use full speed, then this problem does not arise

Similarly, if you add a printf("nak") to

static void HCD_HC_IN_IRQHandler (HCD_HandleTypeDef * hhcd, uint8_t chnum) {

........

if(hhcd->hc[chnum].ep_type == EP_TYPE_INTR)
{
__HAL_HCD_UNMASK_HALT_HC_INT(chnum);
USB_HC_Halt(hhcd->Instance, chnum);
}
else if ((hhcd->hc[chnum].ep_type == EP_TYPE_CTRL)||
(hhcd->hc[chnum].ep_type == EP_TYPE_BULK))
{
/* re-activate the channel */
tmpreg = USBx_HC(chnum)->HCCHAR;
tmpreg &= ~USB_OTG_HCCHAR_CHDIS;
tmpreg |= USB_OTG_HCCHAR_CHENA;
USBx_HC(chnum)->HCCHAR = tmpreg;
}
hhcd->hc[chnum].state = HC_NAK;
__HAL_HCD_CLEAR_HC_INT(chnum, USB_OTG_HCINT_NAK);
printf("nak \r\n");

   }

}

the problem disappears

 

Help me please

Outcomes