Tuesday, June 27th 2017, 2:07am UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

nboutin

Beginner

Date of registration: Dec 10th 2015

Posts: 2

1

Wednesday, June 15th 2016, 4:13pm

USBH_Init & USBH_Exit

Hi,

I don't understand why this simple code would not work properly :

C/C++ Source code

1
2
3
4
5
void MainTask(void)
{
  USBH_Init();
  USBH_Exit();
}


USBH_Exit() get stuck in a while loop in USBH_HW_STM32F2xxFS.c file in function static void _RemoveDriver(USBH_HC_HANDLE hHostController).
It seems that the variable _RemoveComplete is never set to a value different from 0.

For information:
- embUSB-Host version: V1.16e
- µC : STM32L476VG

Thanks for your help,
Nicolas

SEGGER - Yan

Super Moderator

Date of registration: Feb 28th 2014

Posts: 18

2

Tuesday, May 2nd 2017, 9:48am

The USBH and ISR tasks have to be present for exit to work.
Furthermore exit had a couple of issues when used with the ST drivers in V1.16. This was fixed in V1.30b.

Similar threads