I am able to run, BLE on main thread. It is working perfectly.
But when I am trying to run it by creating as a one separate task it is giving me errors.
I want to ask, whether it is possible to run on task other than main thread?
If yes then what precautions we need to take. ? what is minimum stack space that we need to allocate.? or any specific priority that we need to give?
Running BLE in xTaskCreate is not working
Re: Running BLE in xTaskCreate is not working
It isn't clear what you mean by run BLE on a separate thread. In the ESP32 the BLE support is a set of APIs that can be called. I know of no restrictions that would constrain invoking BLE APIs from multiple threads. This has worked just fine for me.
You said you ran it and got errors ... but didn't spend time describing the nature of those errors.
I usually give a new task 20K of stack space (as a default) and haven't had any issues. Obviously the minimum stack space you need will be a function of what your application does and how it uses stack storage. It is like asking "how much paint do I need to paint my house" without knowing anything about your house.
I have not seen anything related to FreeRTOS task priority being an issue.
You said you ran it and got errors ... but didn't spend time describing the nature of those errors.
I usually give a new task 20K of stack space (as a default) and haven't had any issues. Obviously the minimum stack space you need will be a function of what your application does and how it uses stack storage. It is like asking "how much paint do I need to paint my house" without knowing anything about your house.
I have not seen anything related to FreeRTOS task priority being an issue.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
-
- Posts: 263
- Joined: Sun Jun 19, 2016 12:00 am
Re: Running BLE in xTaskCreate is not working
Depends on which core you run it on. You can't do interrupts on both imho.
Who is online
Users browsing this forum: axellin and 55 guests