lpcopen usblib rtos integration

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

lpcopen usblib rtos integration

1,228件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wella-tabor on Wed Jul 03 00:42:12 MST 2013

Hello,


I am using an RTOS with 1 ms tick rate (locked). Because "The USB task must be serviced within 30ms while in device mode, or within 1ms while in host mode.", it is almost impossible to get on timings. I am not sure if a creation of a task with low priority and for(;;) loop is a good solution. Is it possible to execute USB_USBTask() right after the SOF interrupt?


E.g.


<code>RTOS_USB_Task(){ for(;;){ wait_for_SOF_int(); USB_USBTask() } </code>


Best,


Martin


 


Usb configuration: host


Processor: LPC1788

ラベル(1)
  • USB

0 件の賞賛
返信
2 返答(返信)

1,198件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Tsuneo on Mon Jul 15 23:36:17 MST 2013
Some old USB engines on LPC families have restriction of concurrent endpoint access.
Also, LPCUSBLib (modified LUFA) in LPCOpen is careless on the endpoint coding.

See this post on LPCXpresso forum for the details,
http://knowledgebase.nxp.com/showpost.php?p=29724&postcount=2

These problem on "shared resource" should make trouble on RTOS, when your code accesses to endpoints from two or more threads which run concurrently.

Tsuneo
0 件の賞賛
返信

1,198件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wella-tabor on Fri Jul 05 04:55:17 MST 2013

Hello,


what about to write to the forum what steps should be performed to make the usblib more RTOS friendly?


Here is one of them:


- Replace the HcdDelayMS(uint32_t  delay), file HCD.c, by your RTOS function to wait n milliseconds.


In the course of time I'll add more and more.


Best


Martin

0 件の賞賛
返信