title: Queues in FreeRTOS
body: <p>I'm using Freescale FRDM-KL25Z board with Codewarrior 10.6 software. My goal is to make small program in FreeRTOS, which reads voltage from thermistor by analog/digital converter (0-3,3v) and depends on this voltage I'd like turn on/off led diodes. It worked for me till the moment, when I added second task and queues. I'm thinking that problem might be in stack size, but I have no idea how to configure it. </p>
  
  <p>Code is below:</p>
  
  <pre><code>xQueueHandle queue_led;
  
  
  void TaskLed (void *p)
  
  {
  
  uint16_t temp_val;
  
      xQueueReceive(queue_led, &amp;temp_val, 1);  
  
      if (temp_val&lt;60000)
      {
          LED_1_Neg();        
      }
  }
  
  void TaskTemp (void *p)
  {
  
      uint16_t temp_val;
  
      (void)AD1_Measure(TRUE);
      (void)AD1_GetValue16(&amp;temp_val);
  
      xQueueSendToBack(queue_led, &amp;temp_val, 1000);
  
      FRTOS1_vTaskDelay(1000);
  }
  </code></pre>
  
  <p>Code in main():</p>
  
  <pre><code>  xTaskCreate(TaskLed, (signed char *)"tl", 200, NULL, 1, NULL);
    xTaskCreate(TaskTemp, (signed char *)"tt", 200, NULL, 1, NULL);
    vTaskStartScheduler();
    return(0);
  </code></pre>