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.

  • i know,the CAF Power manager can automatically manage USB power states based on USB events.what i need is disable the usb and ble funcation by fn key and will not influence other funcation like key scan .

Reply Children
No Data
Related