Open haseebzaib opened 6 months ago
Also sometimes it works fine, but most of the time it goes into hardfault.
stack overflow in the BTC task.
It is unclear in your code where you are starting the BTC_TASK, but that stack needs to be increased. The default size can be changed in RTOS.h.
I was looking for solutions of how to increase stack size for BLE task but I got no solution. I dont use arduino so I did not had an idea that you have to change it directly in the files and there is no way to change in your code.
Anyways I got it working from some other ble library which I found and did the job.
It is unclear in your code where you are starting the BTC_TASK,
I have no idea how does arduino starts this task, this was the example I found everywhere and just modified it for my case. Though I increased the "void loop stack size" but it did nothing.
Board
ESP32-S3
Device Description
Plain module
Hardware Configuration
Nothing attached to device
Version
v2.0.14
IDE Name
PlatformIO
Operating System
Window 10
Flash frequency
80000000L
PSRAM enabled
yes
Upload speed
115200
Description
Hello everyone.
I have sketch in which simple BLE service is being implemented with 4 of its characteristics. In each characteristic a user input an string and I do operation on that.
The issue I am facing is that, when ever I send the string from any characteristic I get hardfault
And sometimes this hardfault occur and after trying 2 3 times it stops, but it is random for sure.
Now I also increased stack size using this SET_LOOP_TASK_STACK_SIZE(20*1024); but this is not solved.
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide