Why is ble_rx_thread priority cooperative?

ble_rx_thread(SystemWrokq or recv_workq_bt) is cooperative priorities thread in nrf connect SDK

I want to know why.

Also, can I change the priority of the thread to preemption?
(I want to perform device driver processing with a higher priority thread)

Can it be solved by specifying BT_RECV_BLOCKING?

Parents
  • Hi,

    I cannot find any information regarding ble_rx_thread, SystemWrokq, or recv_workq_bt. Could you elaborate in more detail on what those mean or where you see them? Any docs or links? Thanks. 

    Regards,
    Amanda H. 

  • ble_rx_thread / recv_workq_bt is
    zephyr/subsys/bluetooth/host/hci_core.c
    #if defined(CONFIG_BT_RECV_WORKQ_BT)
    static struct k_work_q bt_workq;
    static K_KERNEL_STACK_DEFINE(rx_thread_stack, CONFIG_BT_RX_STACK_SIZE);

    SystemWrokq is
    Zephyr's System Workqueue

    And, it's priority is defined,
    bt_workq:
    K_PRIO_COOP(CONFIG_BT_RX_PRIO) // cooperative priority

    System Workqueue:
    zephyr/subsys/bluetooth/Kconfig
    # The Bluetooth subsystem requires the system workqueue to execute at
    # a cooperative priority.
    config SYSTEM_WORKQUEUE_PRIORITY
        range -256 -1

    What I want to do is run a thread that takes precedence over bluetooth.

Reply
  • ble_rx_thread / recv_workq_bt is
    zephyr/subsys/bluetooth/host/hci_core.c
    #if defined(CONFIG_BT_RECV_WORKQ_BT)
    static struct k_work_q bt_workq;
    static K_KERNEL_STACK_DEFINE(rx_thread_stack, CONFIG_BT_RX_STACK_SIZE);

    SystemWrokq is
    Zephyr's System Workqueue

    And, it's priority is defined,
    bt_workq:
    K_PRIO_COOP(CONFIG_BT_RX_PRIO) // cooperative priority

    System Workqueue:
    zephyr/subsys/bluetooth/Kconfig
    # The Bluetooth subsystem requires the system workqueue to execute at
    # a cooperative priority.
    config SYSTEM_WORKQUEUE_PRIORITY
        range -256 -1

    What I want to do is run a thread that takes precedence over bluetooth.

Children
Related