How to power off and power on the ble and usb module in ncs sdk?

Hi,

im develop a keyboard by ncs sdk in nrf52840,and one funcation is that power off/on the keyboard ny fn key .i see the CAF: Power manager module,It doesn't seem to solve my problem.so there is some event i can send to power on and off the usb and ble module?

Parents
  • Hi,

    The USB state power manager module works in conjunction with the CAF Power manager to handle USB power states. Enable the USB state power manager module by selecting the CONFIG_DESKTOP_USB_PM_ENABLE option. The module will automatically manage USB power states based on USB events:
    When USB is connected and active, it restricts the power level to POWER_MANAGER_LEVEL_ALIVE.
    When USB is suspended, it restricts to POWER_MANAGER_LEVEL_SUSPENDED and generates a force_power_down_event.

    Also, the Bluetooth state power manager module works with the CAF Power manager to handle BLE power states. Enable the Bluetooth state power manager module by selecting the CONFIG_CAF_BLE_STATE_PM option. This module will limit the power level to POWER_MANAGER_LEVEL_SUSPENDED when there's at least one active BLE connection, and remove power level limitations when there are no active connections.

  • hello ,tere is some method to slove this problem?

  • We have the nRF Desktop application (under NCS applications) that is a reference design of HID devices that connect to a host through BLE, USB or both. Depending on the configuration, this application can work as a desktop mouse, gaming mouse, keyboard, or connection dongle. Maybe you can have a look at this application. NRF_DESKTOP

Reply Children
No Data
Related