Are there any Kinetis K series SDK examples that have both a USB host and a USB device in the same example?
Please download sdk for frdm-k66 from nxp website.
Welcome | MCUXpresso SDK Builder
unzip the package, there are two demos for your requirement.
when you connect k66 with your PC, k66 work as a msd device.
when you connect a mouse with K66, it will act as a hid host
Please also refer to this demo,
Daniel - The example you mentioned appears to be an example of how to support OTG. Is there an example of using two ports, one as a device and one as a host simultaneously?
I have the requirement to be a USB host to communicate with a USB CDC device, while being connected to a PC as a USB CDC device.
Could you please let me know which board/MCU you are using?
I thought I would use the K26 MCU as it has two USB ports.
Hi Keith Smith :
Thank you for your additional information.
I would suggest you download the MCUXpresso SDK for TWR-K65F180M board. There is a keyboard2mouse demo.
This demo implements the host and the device, where the KHCI works as host and the EHCI works as a device.
The host supports the keyboard device and device works as a mouse when connecting to the PC. It seems very similar to your requirements.
I hope it helps.
Retrieving data ...