2019-04-16 12:23 PM
Hi
Im using stm32f4 discovery board to initial keyboard but when i connect the keyboard to board it detects the keyboard but didnt send any information.
I change the keyboard and use microsoft curve keyboard 3000 and nothing changed
Im using STM32CUBE_FW_F4_V1.24.0 library and also try the pavel_a solution but nothing happend just i can identify keyboard and initialize it but no data exchange!!!
Im already tired of fixing this issue :(
I would appreciate for any suggestion
regards
2019-04-16 01:27 PM
Try a different keyboard - in fact, try as many different keyboards as you can find/borrow.
Other than that, it's debugging as usually, i.e. you have to develop a deep understanding of the involved hardware, software and protocols, observe the actual behaviour using all available means e.g. logic/bus analyzer, debugger, instrumented code; compare to the expected behaviour, develop hypotheses for the observed deviation in behaviour, develop methods to prove/disprove them, etc. all that stuff.
JW
2019-04-18 02:58 AM
thanks for your answer
i check it again and start to debug
case HID_GET_DATA:
USBH_InterruptReceiveData(phost, HID_Handle->pData,
(uint8_t)HID_Handle->length,
HID_Handle->InPipe);
HID_Handle->state = HID_POLL;
HID_Handle->timer = phost->Timer;
HID_Handle->DataReady = 0U;
break;
case HID_POLL:
if(USBH_LL_GetURBState(phost , HID_Handle->InPipe) == USBH_URB_DONE)
{
if(HID_Handle->DataReady == 0U)
{
USBH_HID_FifoWrite(&HID_Handle->fifo, HID_Handle->pData, HID_Handle->length);
HID_Handle->DataReady = 1U;
USBH_HID_EventCallback(phost);
i dont know why never enter case HID_POLL although in case HID_GET_DATA we write HID_Handle->state = HID_POLL;
i think this is the problem.
any suggestion?!
2019-04-18 04:55 AM
I don't use Cube, sorry.
JW