AnsweredAssumed Answered

51JM128 problems running USB with other tasks

Question asked by Angelo Quattrociocchi on Jul 7, 2011
Latest reply on Jul 18, 2011 by Pawel Chmielewski

I have a custom board based on the 51JM128, running MQX, including the MSD USB class and MFS filesystem.  On its own the USB task (based on the JMEVB examples) works fine, but adding other tasks seems to cause problems.  Similarly, the other tasks on their own (without the USB task running) work OK, so I don't think there are problems with the task stack sizes for the USB or other tasks, but once the USB task runs concurrently with another task the USB gives errors, or doesn't respond to the attach event, etc. 


In particular, I have a task which starts a timer event and monitors the GPIO, using short delays (_time_delay), and another task that monitors a UART port.  If either of these are started while the USB is going, usually both tasks fail or stop somewhere.


The USB task was given a higher priority than the other tasks (and I also tried giving it a lower priority), with similar results.


Is this just a RAM limitation problem, or are there some other factors I'm not taking into consideration regarding resource conflicts, etc.?  Is there any problem running timer events and delays in other tasks while running a USB task?  Should I change the type of scheduling?


Thank you for any input.