cancel
Showing results for 
Search instead for 
Did you mean: 

Usb hid host problem

umarnaeem
Associate
Posted on July 21, 2014 at 23:15

I am interfacing a standard usb keyboard with stm32f4 discovery board. I am using a usb host library which are provided by st. Now the keyboard is successfully connected with discovery board and all keys are decoded successfully but there is a problem with Num lock, Caps lock and scroll lock keys. these keys are decoded by discovery board but the discovery board which is host cannot turn ON or OFF the respective leds of Num lock, Caps lock and scroll lock keys on keyboard.

My question is howw can i turn ON or OFF these leds. 

#usb #discovery #stm32 #stm32f4
2 REPLIES 2
chandu1
Associate II
Posted on July 22, 2014 at 09:24

Hi naeem.umar,

I am requesting you please explain me about how you write the packet into the transmit FIFO, if it is possible can you please share your code for me.

Thanks & Regards,

Chandu.Kurapati.

umarnaeem
Associate
Posted on July 24, 2014 at 18:27

I am using Usb hid library given by st. In documents i study when num lock key is pressed the the host will return a report packet to device which will turn ON or OFF the led.so for this i am using below code.

USBH_Set_Report (&USB_OTG_Core_dev , &USB_Host, 0x02, 0x00, 0x01, (uint8_t *)1);

when numlock key is pressed and decoded by controller then i call this above instruction but when i call this instruction the code will hang. Kindly tell how can i control these leds .