Skip to main content
jahn.11
Visitor II
October 26, 2022
Question

Wake up from sleep mode with STM32F103VET6 HID keyboard

I'm making a keyboard using STM32F103VET6.

​

Sleep mode was successful using keyboards.

​

But, It does not wake up.

​

A problem was found in the code below. (pdev->dev_state == USBD_STATE_SUSPENDED)

​

uint8_t USBD_HID_SendReport(USBD_HandleTypeDef *pdev, uint8_t *report, uint16_t len)

{

USBD_HID_HandleTypeDef *hhid = (USBD_HID_HandleTypeDef *)pdev->pClassData;

​

if (pdev->dev_state == USBD_STATE_CONFIGURED)

{

if (hhid->state == HID_IDLE)

{

hhid->state = HID_BUSY;

USBD_LL_Transmit(pdev, HID_EPIN_ADDR, report, len);

}

}

return USBD_OK;

}

​

How should I approach to solve the problem?

​

HID Descriptor? or other Method?​

This topic has been closed for replies.