sam s

USB Interface Select problem

Discussion created by sam s on Oct 15, 2012

Hi, I have M52259 with mqx 3.8

I used web_hvac example's USB part in my application;

I create some new tasks dynamically in my application. the USB part works properly before starting new tasks, but when I make my new tasks ready and run them, the usb part crashes when I detach and reattach usb stick.

I debugged it with printf and found that it crashes here:


error = _usb_hostdev_select_interface(deviceUSB.DEV_HANDLE,


  (pointer) &deviceUSB.CLASS_INTF);



here is my task creation part:




runTaskTemplate.TASK_PRIORITY = 9;

runTaskTemplate.TASK_STACKSIZE = 2000;

runTaskTemplate.TASK_ADDRESS   = runPLCTask;

runTaskTemplate.CREATION_PARAMETER = (uint_32)tsk;

runTaskTemplate.DEFAULT_TIME_SLICE =10;


childTaskID=_task_create_blocked(1, 0, (uint_32)&runTaskTemplate);







/*  another task make this task ready and it continues:  */







    * Waiting for child tasks to finish







can anybody help me?