Welcome to mirror list, hosted at ThFree Co, Russian Federation.

readme.txt « HID_Standalone « USB_Device « Applications « P-NUCLEO-WB55.Nucleo « Projects - github.com/Flipper-Zero/STM32CubeWB.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 69b3da164be1035055508a711d6d629fddc746e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/**
  @page HID_Standalone USB Device Human Interface (HID) application

  @verbatim
  ******************************************************************************
  * @file    USB_Device/HID_Standalone/readme.txt
  * @author  MCD Application Team
  * @brief   Description of the USB HID application.
  ******************************************************************************
  *
  * Copyright (c) 2019 STMicroelectronics. All rights reserved.
  *
  * This software component is licensed by ST under Ultimate Liberty license
  * SLA0044, the "License"; You may not use this file except in compliance with
  * the License. You may obtain a copy of the License at:
  *                               www.st.com/SLA0044
  *
  ******************************************************************************
  @endverbatim

@par Application Description

Use of the USB device application based on the Human Interface (HID).
  This is a typical application on how to use the stm32wbxx USB OTG Device peripheral, where the STM32 MCU is
enumerated as a HID device using the native PC Host HID driver to which the P-NUCLEO-WB55
board is connected, in order to emulate the Mouse directions using User push-button mounted on the
P-NUCLEO-WB55 board.

At the beginning of the main program the HAL_Init() function is called to reset all the peripherals,
initialize the Flash interface and the systick. The user is provided with the SystemClock_Config()
function to configure the system clock (SYSCLK). The Full Speed (FS) USB module uses
internally a 48-MHz clock which is coming from a specific output of two PLLs (PLL or PLL SAI) or from MSI

This example supports remote wakeup (which is the ability of a USB device to bring a suspended bus back
to the active condition), and the User push-button is used as the remote wakeup source.

By default, in Windows powered PC the Power Management feature of USB mouse devices is turned off.
This setting is different from classic PS/2 computer functionality. Therefore, to enable the Wake from
standby option, user must manually turn on the Power Management feature for the USB mouse.

To manually enable the wake from standby option for the USB mouse, proceed as follows:
 - Start "Device Manager",
 - Select "Mice and other pointing devices",
 - Select the "HID-compliant mouse" device (make sure that PID & VID are equal to 0x5710 & 0x0483 respectively)
 - Right click and select "Properties",
 - Select "Power Management" tab,
 - Finally click to select "Allow this device to wake the computer" check box.

@note Care must be taken when using HAL_Delay(), this function provides accurate delay (in milliseconds)
      based on variable incremented in SysTick ISR. This implies that if HAL_Delay() is called from
      a peripheral ISR process, then the SysTick interrupt must have higher priority (numerically lower)
      than the peripheral interrupt. Otherwise the caller ISR process will be blocked.
      To change the SysTick interrupt priority you have to use HAL_NVIC_SetPriority() function.

@note The application needs to ensure that the SysTick time base is always set to 1 millisecond
      to have correct HAL operation.

For more details about the STM32Cube USB Device library, please refer to UM1734
"STM32Cube USB Device library".

@par Keywords

Connectivity, USB_Device, USB, HID, Full Speed, Mouse, Remote Wakeup

@par Directory contents

  - USB_Device/HID_Standalone/Core/Src/main.c                  Main program
  - USB_Device/HID_Standalone/Core/Src/stm32wbxx_hal_msp.c     MSP Initialization and de-Initialization codes
  - USB_Device/HID_Standalone/Core/Src/system_stm32wbxx.c      STM32WBxx system clock configuration file
  - USB_Device/HID_Standalone/Core/Src/stm32wbxx_it.c          Interrupt handlers
  - USB_Device/HID_Standalone/USB_Device/Target/usbd_conf.c    General low level driver configuration
  - USB_Device/HID_Standalone/USB_Device/App/usbd_desc.c       USB device HID descriptor
  - USB_Device/HID_Standalone/USB_Device/App/usbd_device.c     USB Device
  - USB_Device/HID_Standalone/Core/Inc/main.h                  Main program header file
  - USB_Device/HID_Standalone/Core/Inc/stm32wbxx_it.h          Interrupt handlers header file
  - USB_Device/HID_Standalone/Core/Inc/stm32wbxx_hal_conf.h    HAL configuration file
  - USB_Device/HID_Standalone/USB_Device/Target/usbd_conf.h    USB device driver Configuration file
  - USB_Device/HID_Standalone/USB_Device/App/usbd_desc.h       USB device HID descriptor header file
  - USB_Device/HID_Standalone/USB_Device/App/usbd_device.h     USB Device header


@par Hardware and Software environment

  - This application runs on STM32WBxx devices.

  - This application has been tested with STMicroelectronics P-NUCLEO-WB55 board
    and can be easily tailored to any other supported device and development board.

  - P-NUCLEO-WB55 board Set-up
    - Connect the P-NUCLEO-WB55 board CN1 to the PC through micro A-Male to standard A Male cable.
    - Press the User push-button (SW1)  to move the cursor.

@par How to use it ?

In order to make the program work, you must do the following :
 - Open your preferred toolchain
 - Rebuild all files and load your image into target memory
 - Run the application

 * <h3><center>&copy; COPYRIGHT STMicroelectronics</center></h3>
 */