I have one codec that produces 16bit at 8kHz samples that I send trough BT (SPP profile).
In between I receive AT commands from Serial2 and from BT. AT commands received from BT are routed to Serial2 whose response is sent through BT.
Everything is managed via two task, one per core. Task0 manages writes to BT (and the codec), Task1 manages the readings from BT and Serial2.
At startup Task0 begins to read audio from the codec and send it via BT. Continuosly.
Then I start to send AT commands (via BT).
After a while it happens that BT stops sending data; and after about 20 cycles Task0 freezes on btSerial.write(buffer,size);
Task1 continues to run normally.
I tryed to add a semaphore to ensure that the issue could'nt be related to concurrent read/write BT access, but is seams BTSerial is thread-safe.
I suppose Task0 freezes because of a buffer-overflow and it is a symptom, not the cause.
Why BT stops sending data? Anyone had a similar issue?
SerialBT freezes while writing
Jump to
- English Forum
- Explore
- News
- General Discussion
- FAQ
- Documentation
- Documentation
- Sample Code
- Discussion Forum
- Hardware
- ESP-IDF
- ESP-BOX
- ESP-ADF
- ESP-MDF
- ESP-WHO
- ESP-SkaiNet
- ESP32 Arduino
- IDEs for ESP-IDF
- ESP-AT
- ESP IoT Solution
- ESP RainMaker
- Rust
- ESP8266
- Report Bugs
- Showcase
- Chinese Forum 中文社区
- 活动区
- 乐鑫活动专区
- 讨论区
- 全国大学生物联网设计竞赛乐鑫答疑专区
- ESP-IDF 中文讨论版
- 《ESP32-C3 物联网工程开发实战》书籍讨论版
- 中文文档讨论版
- ESP-AT 中文讨论版
- ESP-BOX 中文讨论版
- ESP IoT Solution 中文讨论版
- ESP-ADF 中文讨论版
- ESP Mesh 中文讨论版
- ESP Cloud 中文讨论版
- ESP-WHO 中文讨论版
- ESP-SkaiNet 中文讨论版
- ESP 生产支持讨论版
- 硬件问题讨论
- 项目展示
Who is online
Users browsing this forum: No registered users and 102 guests
- All times are UTC
- Top
- Delete cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. ESP8266EX and ESP32 are some of our products.