USB CDC RX issue on KW24

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

USB CDC RX issue on KW24

跳至解决方案
846 次查看
fabricetocci
Contributor III

Hi,

I'm trying to get USB CDC working full duplex on TWR_KW24D512

I have built my prooject with beekit release 3.0.2, HaOnOffSwitch_EndDevice.

I can send and received data on UART1 (TWR_KW24 <--> Teraterm)

I have included the files needed to support USB CDC and added initialisation calls as follow:

in BeeAppInit.c void Main()

#if gVirtualCOMPort_d

  // Initializes USB vitual COM port //

  USB_Init();

  (void)CDC_ModuleInit();

#endif // #if gVirtualCOMPort_d

in BeeApp.c (void BeeAppIni (void))

#if gVirtualCOMPort_d

  // USB data log and Command Port Rx CallBack Setting

  CDC_SetRxCallBack(BS_SerialRxCallback);

#endif //gVirtualCOMPort_d

I can send without any problem logs to tera term window calling:

CDC_Transmit(pBuf, bufLen, pfCallBack)

There is a problem on USB CDC RX side:

BS_SerialRxCallback function, is not called everytime data are sent from teraterm to TWR-KW24.

It is called only two times and no more.

First data frame is not seen

second data frame is not seen

third data frame is not seen

Forth data frame is properly received

5th data frame is not seen

6th data frame is not seen

7th data frame is not seen

9th data frame is not seen

10th data frame is properly received

All following frames are not seen!!!??

What can be the rout cause of this behavior?

Thank you for your support

Best regards.

Fabrice.

标签 (2)
标记 (2)
0 项奖励
回复
1 解答
679 次查看
fabricetocci
Contributor III

Hi Isaac,

I looped back the received characters and the USB CDC works fine now.

Thank you for your efficient support.

Best regards.

Fabrice.

在原帖中查看解决方案

0 项奖励
回复
2 回复数
679 次查看
isaacavila
NXP Employee
NXP Employee

Hello Fabrice,

I've not checked Beestack further but this kind of issue seems similar to the one described in this thread: KSDK VCOM example does not work without loopback​, I can advise you to see USB callbacks and understand its structure and see if same problem/solution applies to your project.

I will try to reproduce this issue and will let you know if something is found!

Hope this can help!

Best Regards,

Isaac

0 项奖励
回复
680 次查看
fabricetocci
Contributor III

Hi Isaac,

I looped back the received characters and the USB CDC works fine now.

Thank you for your efficient support.

Best regards.

Fabrice.

0 项奖励
回复