CDC Host component for KL25Z

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

CDC Host component for KL25Z

ソリューションへジャンプ
2,462件の閲覧回数
pedropol
Contributor II

Anyone know if there are any plan to release a CDC HOST processor expert component for mcu KL25Z?

0 件の賞賛
返信
1 解決策
1,822件の閲覧回数
MVa
NXP Employee
NXP Employee

There is new USB Stack 4.0.3 available now on http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MEDICALUSB.

See "\Freescale USB Stack v4.0.3\ProcessorExpert\Examples\Host\CDC\USB_CDC_HOST_MKL25Z128_PEx"

MVa

元の投稿で解決策を見る

0 件の賞賛
返信
8 返答(返信)
1,823件の閲覧回数
MVa
NXP Employee
NXP Employee

There is new USB Stack 4.0.3 available now on http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MEDICALUSB.

See "\Freescale USB Stack v4.0.3\ProcessorExpert\Examples\Host\CDC\USB_CDC_HOST_MKL25Z128_PEx"

MVa

0 件の賞賛
返信
1,822件の閲覧回数
chriswestervelt
Contributor III

So with the USB  4.0.3 stack you have a Processor Expert CDC Host example for the MKL25Z128.  When I connect a usb to serial cable with a pl2303 chip in it, it registers a connect but the device (usb/serial) does not seem to get initialized and I don't see how any data could be passed.  It looks like the code is unfinished so as to initialize, bind, and connect to allow data to be passed and received.  I need to connect two freedom boards together as a Host->Device in CDC mode. Can you tell me what functionality is complete in this example project and what else needs to be done to complete this setup?

0 件の賞賛
返信
1,822件の閲覧回数
florintoma
NXP Employee
NXP Employee

     If you are using a freedom board as host, you have to make some hardware modding to apply 5V on the USB connector. Some A-B adapters are required too. Check the topic USB Host Mode Hack for the Freedom KL25Z Board | MCU on Eclipse

please.

0 件の賞賛
返信
1,822件の閲覧回数
chriswestervelt
Contributor III

That was the first thing I did.  However, we put breakpoints in the code to verify connect and disconnect but as far as sending and receiving data, that does not appear to work.  There are several functions in the bean that have to do with binding and setting things up that don't get called.  Can you confer?

0 件の賞賛
返信
1,822件の閲覧回数
florintoma
NXP Employee
NXP Employee

If you are using the PL2303 to test the KL25Z host, please check if the Interface Class is not vendor specific. I've tested a PL2303 myself and found out that the Interface Class is vendor specific and the filed bInterfaceClass is 0xFF, so the host will require custom class drivers as the code stops at USB chapter 9 command "Set Configuration". I've tested the MKL25Z128 CDC host project using a TWR-KL25Z48M board and worked fine with a Kinetis CDC device.

0 件の賞賛
返信
1,823件の閲覧回数
chriswestervelt
Contributor III

Thanks!  This makes sense.  Could you tell me which source file handles the vendor specific checks and fires off the setup or is there and .h file that defines acceptable VID:PIDs?

0 件の賞賛
返信
1,823件の閲覧回数
florintoma
NXP Employee
NXP Employee

The function usb_host_driver_info_scan() from host_common.c checks if a know driver match the device, after a new configuration descriptor is received. The device driver info's are stored in the device_driver_info.c. The PL2303 driver class is not CDC but vendor specific so you should reverse engineer some OS driver and analyze the protocol (seems that it has 2 bulk endpoint and 1 interrupt) and make your own functions. Or you could just use another FRDM board as device.

0 件の賞賛
返信
1,823件の閲覧回数
pedropol
Contributor II

Thanks :smileyhappy:

0 件の賞賛
返信