Fail to integrate nxpUSBlib with uCOS II

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Fail to integrate nxpUSBlib with uCOS II

539 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lier on Sun Jan 13 08:52:12 MST 2013
I have run VirtualSerial example on my LPC1754 board, then I integrate nxpUSBlib with a uCOS II based project. I use a thread to replace for(;;) loop, this thread runs every 5ms.

Sometimes USB device can enumerate successful, sometimes failed. If enumerate successful, the device can communicate with Host PC, echo some characters, then stop responding. It seems OS scheduler is broken, the thread never be called any more.

I try to add OSIntEnter()/OSIntExit() before/after USB_IRQHandler(), and add OS_ENTER_CRITICAL()/OS_EXIT_CRITICAL() before/after HAL_EnableUSBInterrupt() and HAL_DisableUSBInterrupt(), something like that, to prevent the functions in nxpUSBlib interrupt OS scheduler. Since I am not familiar with the code of nxpUSBlib, I am not sure how many functions need to be modified to make them compatible with a RTOS.

Have you tried to run nxpUSBlib with any RTOS? Do you have any suggestion about this case? Thanks.
Labels (1)
0 Kudos
0 Replies