AnsweredAssumed Answered

USB Get String Descriptor stall

Question asked by hudgell.michael on May 13, 2016
Latest reply on May 23, 2016 by Amel N
Hi,

I'm using the STM32CubeMX USB Device Library version 2.2.0 (generated by STM32CubeMX) and am occasionally getting the situation where getting the string descriptor stalls when requesting it 

for descriptor index 2 and 3, but other insertions it works no problem.

It looks like a timing-thing, or I'm not properly resetting the peripheral. However, during the disconnect I added the following to the HAL_PCD_MspDeInit routine to try and get round this:

/* USER CODE BEGIN USB_MspDeInit 1 */
  RCC->APB1RSTR |=RCC_APB1RSTR_USBRST;
  __NOP();
  __NOP();
  __NOP();
  __NOP();
  __NOP();
  __NOP();
  __NOP();
  __NOP();
  __NOP();
  __NOP();
  __NOP();
  RCC->APB1RSTR &=~RCC_APB1RSTR_USBRST;
/* USER CODE END USB_MspDeInit 1 */

Has anyone come across this before?

Outcomes