# vTaskStartTrace() on AVR

**URL:** <https://forums.freertos.org/t/vtaskstarttrace-on-avr/3261>\
**Category:** Kernel\
**Created:** [January 29, 2007, 6:07pm UTC](https://forums.freertos.org/t/vtaskstarttrace-on-avr/3261 "2007-01-29T18:07:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [January 29, 2007, 6:07pm UTC](https://forums.freertos.org/t/vtaskstarttrace-on-avr/3261/1 "2007-01-29T18:07:21Z")

</div>

**nobody** wrote on [Monday, January 29, 2007](https://sourceforge.net/p/freertos/discussion/382005/thread/8f6441d9/#c09e):

Hallo,

i’m doing some tests with FreeRTOS on ATMEL AVR (ATmega32) and i have a problem with the vTaskStartTrace() function.

In my main.c i have defined a buffer:  
#define BUFFER\_SIZE&nbsp;&nbsp;&nbsp; ( ( unsigned portSHORT ) 512 )  
static portCHAR pcWriteBuffer[BUFFER\_SIZE];

I call vTaskStartTrace(pcWriteBuffer, BUFFER\_SIZE) in a suicid-task. I think after calling vTaskStartTrace() there shoult be a list in memory on adress pcWriteBuffer. I copied the data on this adress into i file (then hex2bin and tracecon). But the result can’t be correct:

1950631244.000000&nbsp;&nbsp;&nbsp; 29537  
1145392128.000000&nbsp;&nbsp;&nbsp; 29537  
1145392128.000000&nbsp;&nbsp;&nbsp; 24948  
1224867890.000000&nbsp;&nbsp;&nbsp; 24948  
1224867890.000000&nbsp;&nbsp;&nbsp; 19524  
151614245.000000&nbsp;&nbsp;&nbsp; 19524  
151614245.000000&nbsp;&nbsp;&nbsp; 25381  
1965361525.000000&nbsp;&nbsp;&nbsp; 25381  
1965361525.000000&nbsp;&nbsp;&nbsp; 9481  
168624138.000000&nbsp;&nbsp;&nbsp; 9481  
168624138.000000&nbsp;&nbsp;&nbsp; 0  
43264.000000&nbsp;&nbsp;&nbsp; 0  
43264.000000&nbsp;&nbsp;&nbsp; 0  
66304.000000&nbsp;&nbsp;&nbsp; 0  
66304.000000&nbsp;&nbsp;&nbsp; 3  
0.000000&nbsp;&nbsp;&nbsp; 3  
0.000000&nbsp;&nbsp;&nbsp; 0  
0.000000&nbsp;&nbsp;&nbsp; 0  
0.000000&nbsp;&nbsp;&nbsp; 0  
0.000000&nbsp;&nbsp;&nbsp; 0

What have i done wrong? I’m new in freertos and also in c, so sorry, if it is my mistake!

Kristian

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [January 29, 2007, 8:04pm UTC](https://forums.freertos.org/t/vtaskstarttrace-on-avr/3261/2 "2007-01-29T20:04:55Z")

</div>

**nobody** wrote on [Monday, January 29, 2007](https://sourceforge.net/p/freertos/discussion/382005/thread/8f6441d9/#c09e/1c0a):

Could it be the endian of the data.&nbsp; I think there is a trace con for big and little endian.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [January 30, 2007, 6:56pm UTC](https://forums.freertos.org/t/vtaskstarttrace-on-avr/3261/3 "2007-01-30T18:56:28Z")

</div>

**nobody** wrote on [Tuesday, January 30, 2007](https://sourceforge.net/p/freertos/discussion/382005/thread/8f6441d9/#c09e/0d82):

I fixed it, but i do not know how. I set the priority of the vTaskStartTrace() calling task to the highest priority. But i think my that this was not my problem …  
Now it looks like this:

13.000000&nbsp;&nbsp;&nbsp; 2  
25.000000&nbsp;&nbsp;&nbsp; 2  
25.000000&nbsp;&nbsp;&nbsp; 0  
26.000000&nbsp;&nbsp;&nbsp; 0  
26.000000&nbsp;&nbsp;&nbsp; 1  
27.000000&nbsp;&nbsp;&nbsp; 1  
27.000000&nbsp;&nbsp;&nbsp; 0  
28.000000&nbsp;&nbsp;&nbsp; 0  
28.000000&nbsp;&nbsp;&nbsp; 1  
29.000000&nbsp;&nbsp;&nbsp; 1  
29.000000&nbsp;&nbsp;&nbsp; 0  
30.000000&nbsp;&nbsp;&nbsp; 0  
30.000000&nbsp;&nbsp;&nbsp; 1  
31.000000&nbsp;&nbsp;&nbsp; 1  
31.000000&nbsp;&nbsp;&nbsp; 0  
32.000000&nbsp;&nbsp;&nbsp; 0

Kristian
