cancel
Showing results for 
Search instead for 
Did you mean: 

HALT management in USB stack

Luca Giuliodori
Associate III
Posted on December 19, 2017 at 12:56

Looking in the internet I found this webpage

/external-link.jspa?url=http%3A%2F%2Fwiki.osdev.org%2FUniversal_Serial_Bus%23STALL

that say: 'Typically, the STALL handshake indicates a functional stall. A functional stall occurs when the halt feature (which will be covered under 'USB Framework') of an endpoint is set. In this circumstance, host intervention is required via the default control pipe to clear the halt feature of the halted endpoint.'

I don't know if it is the solution but in my opinion the ST's USB stack doesn't do nothing when halt feture accours.

In addition in the file 'stm32f4xx_II_usb.c', in the 'USB_HC_StartXfer' function, at line 1596, the code sould be 'is_oddframe = (USBx_HOST->HFNUM & 0x01) ? 1 : 0;' instead of 'is_oddframe = (USBx_HOST->HFNUM & 0x01) ? 0 : 1;' and, in accord with reference manual, the MCNT bits of OTG_HCCHAR register, should be at value '01' and not '00' ( 00: Reserved. This field yields undefined results).

I have tried to fix these but the problems persist but I'm not sure there aren't other bugs.

I hope to solve this problems

null
0 REPLIES 0