Ringbuf: Acquiring entire ring buffer results in items being received prematurely (IDFGH-13694) #14568
Closed
3 tasks done
Labels
Resolution: NA
Issue resolution is unavailable
Status: Done
Issue is done internally
Type: Bug
bugs in IDF
Answers checklist.
IDF version.
v5.4-dev-2744-g59e1838270
Espressif SoC revision.
ESP32-D0WD-V3 (revision v3.0)
Operating System used.
Linux
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
Development Kit.
Custom Board
Power Supply used.
External 3.3V
What is the expected behavior?
I expect to:
xRingbufferSendAcquire
until the ring buffer is full.xRingbufferSendComplete
. I expect to be able to do this in a different order from which the items were acquired in step 1.xRingbufferReceive
on a separate task in the order they were acquired in step 1 and containing their expected values.What is the actual behavior?
Instead, when the buffer is full, the oldest acquired item is returned by
xRingbufferReceive
even if that item has not been sent yet usingxRingbufferSendComplete
. If the sending task has not yet finished writing to this oldest acquired item then it results in the receiving task reading the wrong value for that item.Steps to reproduce.
xRingbufferSendAcquire
(labelled asitem1
in the steps and code below)4a. Acquire item using
xRingbufferSendAcquire
4b. Write a value to item
4c. Send item using
xRingbufferSendComplete
item1
item1
usingxRingbufferSendComplete
Code to reproduce:
Expected result of above code:
Actual result of above code:
Debug Logs.
More Information.
I am building using the docker image
espressif/idf:latest
.The text was updated successfully, but these errors were encountered: