CDC Host component for KL25Z

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

CDC Host component for KL25Z

跳至解决方案
3,680 次查看
pedropol
Contributor II

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

0 项奖励
回复
1 解答
3,040 次查看
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 回复数
3,041 次查看
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 项奖励
回复
3,040 次查看
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 项奖励
回复
3,040 次查看
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 项奖励
回复
3,040 次查看
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 项奖励
回复
3,040 次查看
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 项奖励
回复
3,041 次查看
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 项奖励
回复
3,041 次查看
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 项奖励
回复
3,041 次查看
pedropol
Contributor II

Thanks :smileyhappy:

0 项奖励
回复