Hi,
I had a problem with a multi-buffered output data functionality. The below is my implementation for adc samping using multiple buffer.
I tested the implementation thru SCS Task Testing. The program got stuck in adcReadFifo() function.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
I had a problem with a multi-buffered output data functionality. The below is my implementation for adc samping using multiple buffer.
I tested the implementation thru SCS Task Testing. The program got stuck in adcReadFifo() function.
I do not have the lab equipment to realize a pre-determined signal. However I saved a log file to examine the incoming data. I had interesting results: In the text document, every 123 data corresponds to 1 packet and the data belongs to a sinusoidal wave (with DC). The packet itself seems correct because it is compatible with the wave. However between the packages there is always jump as far as I can see. What is the reason for that and how can I fix it?
Thanks.
1172.LOG.txt
I figured out the problem. I assigned the array as 123 + 1(flag). I directly send this buffer using BLE. I misunderstood the Data Length Extension concepts. Here is what it should be:
The maximum allowed PDU is 251, therefore maximum MTU can be 247. Because it is notificatication characteristic, maximum size can be 244 bytes. When I decreased my buffer size to 121 +1 (uint16), the number of jumps decreased, but not completely.