what's the bluetooth event task's priority

kxJiang
Posts: 6
Joined: Fri Jun 16, 2017 8:41 am

what's the bluetooth event task's priority

Postby kxJiang » Mon Jun 19, 2017 3:17 am

what's the default bluetooth event task's priority?
If I want to create a FreeRTOS task that it's priority is higher than bluetooh.
I want to treat the data received from bluetooth's notify event as the producer,
and a task that acts as a consumer. Is there a way to set this consumer task's priority higher
than the bluetooth event call back task?

f.h-f.s.
Posts: 215
Joined: Thu Dec 08, 2016 2:53 pm

Re: what's the bluetooth event task's priority

Postby f.h-f.s. » Mon Jun 19, 2017 9:37 am

I don't think you would want to create tasks with a higher priority than 18.
I was using alot of time in the bluetooth and wifi event handler which caused problems with my internet connections (tiT for example is the TCP/IP Stack task)

Code: Select all

D (139123) Ping: Task: MyTask StackHWM: 4900bytes Priority: 2 RunTimeCounter: 0 TotalRunTime: 0
D (139133) Ping: Task: IDLE StackHWM: 872bytes Priority: 0 RunTimeCounter: 0 TotalRunTime: 0
D (139133) Ping: Task: tiT StackHWM: 2840bytes Priority: 18 RunTimeCounter: 0 TotalRunTime: 0
D (139143) Ping: Task: MyOtherTask StackHWM: 4760bytes Priority: 1 RunTimeCounter: 0 TotalRunTime: 0
D (139153) Ping: Task: Tmr Svc StackHWM: 1524bytes Priority: 1 RunTimeCounter: 0 TotalRunTime: 0
D (139163) Ping: Task: btController StackHWM: 2104bytes Priority: 23 RunTimeCounter: 0 TotalRunTime: 0
D (139173) Ping: Task: hciHostT StackHWM: 1952bytes Priority: 22 RunTimeCounter: 0 TotalRunTime: 0
D (139183) Ping: Task: hciH4T StackHWM: 1780bytes Priority: 21 RunTimeCounter: 0 TotalRunTime: 0
D (139193) Ping: Task: btuT StackHWM: 3668bytes Priority: 20 RunTimeCounter: 0 TotalRunTime: 0
D (139203) Ping: Task: Btc_task StackHWM: 7048bytes Priority: 19 RunTimeCounter: 0 TotalRunTime: 0
D (139213) Ping: Task: rtT StackHWM: 2984bytes Priority: 22 RunTimeCounter: 0 TotalRunTime: 0
D (139223) Ping: Task: wifi StackHWM: 1952bytes Priority: 23 RunTimeCounter: 0 TotalRunTime: 0
D (139223) Ping: Task: pmT StackHWM: 1000bytes Priority: 21 RunTimeCounter: 0 TotalRunTime: 0
D (139233) Ping: Task: ipc0 StackHWM: 952bytes Priority: 24 RunTimeCounter: 0 TotalRunTime: 0
D (139243) Ping: Task: eventTask StackHWM: 2212bytes Priority: 20 RunTimeCounter: 0 TotalRunTime: 0

kxJiang
Posts: 6
Joined: Fri Jun 16, 2017 8:41 am

Re: what's the bluetooth event task's priority

Postby kxJiang » Mon Jun 26, 2017 9:04 am

Thanks for your advice, One more thing I want to know is that how can you retrieve the priority of bluetooth stack and wifi stack.
Are there any reference manual available? I know the example in ESP's SDK treat the app_main as a FreeRTOS's task, what about the other module like bluetooth & wifi stack? Are they created as FreeRTOS's task too?

f.h-f.s.
Posts: 215
Joined: Thu Dec 08, 2016 2:53 pm

Re: what's the bluetooth event task's priority

Postby f.h-f.s. » Mon Jun 26, 2017 11:21 am

viewtopic.php?f=13&t=748&p=3103&hilit=u ... tate#p3103
http://www.freertos.org/uxTaskGetSystemState.html Look at the example usage.
All tasks are FreeRTOS tasks in esp-idf.

paddy_b
Posts: 11
Joined: Wed Jun 06, 2018 2:00 pm

Re: what's the bluetooth event task's priority

Postby paddy_b » Tue Feb 25, 2020 10:14 am

Probably too late to help you, but for anyone else finding this thread:

Calling uxTaskPriorityGet() from a BLE event handler returns 19, which would make sense with what f.h-f.s. said about going over 18 for other tasks

Who is online

Users browsing this forum: No registered users and 128 guests