Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 9 months ago.
Why USBHID doesn't work with FRDM-K64F?
I switched from a FRDM-KL25Z to a FRDM-K64F to try the mbed-cli and started experimenting with a blinky program. When I add a USBHID device, the blinky stops working. At first I thought it was a problem with the mbed-cli, but then I realized that with the online compiler the program also fails. Is the FRDM-K64F incompatible with the (USBDevice) USBHID library?
The program is:
testing USBHID on a Blinky
#include "mbed.h" #include "USBDevice/USBHID/USBHID.h" DigitalOut red(LED1); USBHID hid(8,8); int main() { while(1) { red = 0; wait(0.5); red = 1; wait(0.5); } }
When I comment line 5 (the USBHID one) the program works. The program also works if I change the line to:
USBHID hid();
----
Edit:
It seems that the USBDevice library is only compatible with FRDM-KL25Z, LPC1768 and LPC11U24 according to https://developer.mbed.org/handbook/USBDevice. How are we supposed to use the USB on the FRDM-K64F?