Setup USB on K66 Cortex M4F in MCUXpresso

cancel
Showing results for 
Search instead for 
Did you mean: 

Setup USB on K66 Cortex M4F in MCUXpresso

305 Views
rene_01
Contributor I

Hello,

Firstly, I would like to emphasize that my embedded programming skills is very limited, and I apologize in advance :smileyhappy:

I am trying to set up a USB device on a custom PCB with a MK66FX1M0xxx18 MCU, using MCUXpresso. 

Have managed to somehow get myself to this point, see attached Picture 1 NXP. 

I'm somewhat lost in the documentation of usb_device.h as to what the specifics of this, actually wants me to do:

extern usb_status_t USB_DeviceInit(uint8_t controllerId,
usb_device_callback_t deviceCallback,
usb_device_handle *handle);

I can read the code documentations to it, but to be honest it doesn't really make sense, hence why I'm here..

Second question (sort of pertaining to the first one as well..)

Previously I configured the 2 ADCs on the MCU to work as inputs by going via the pin and peripherals layout, so I effectively circumvented having to write the code myself, however, I can't find USB in the peripherals tab whatsoever. So if there's a way to add it there then I guess that would be the easiest, as opposed to manually writing out the configurations.. 

Thanks in advance for any advice or assistance, and sorry again if the category choice(s) are a bit all over the place !

Regards,

René

0 Kudos
1 Reply

167 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi,

I think you can start from a USB device demo. Don't start from empty project. There are lots of USB device demo in SDK_2.5.0_FRDM-K66F (1)\boards\frdmk66f\usb_examples.

Regards,

Jing

0 Kudos