Is USB_DeviceCdcVcomCallback() inside an interrupt routine?

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

Is USB_DeviceCdcVcomCallback() inside an interrupt routine?

914件の閲覧回数
davepfaltzgraff
Senior Contributor I

The situation is that I'm am adapting the example in C:\KSDK2\boards\frdmk22f\usb_examples\usb_device_cdc_vcom to run with/under FreeRTOS. As it is written, the background routine polls for input. What I'd like to do is link the background routine to the callback() routine with a semaphore to indicate that data is ready to be read.

 

So, inside the callback() routine, should I use the xSemaphhoreGiveFromISR() or the xSemaphhoreGive() routine?

 

Thanks

ラベル(1)
タグ(2)
0 件の賞賛
返信
1 返信

794件の閲覧回数
ivadorazinova
NXP Employee
NXP Employee

Hi David,

is highly recommended to use xSemaphhoreGiveFromISR() instead of xSemaphhoreGive().

If you use xSemaphhoreGive() you could get in trouble because of race conditions.

I hope this helps.

Best Regards,

Iva

0 件の賞賛
返信