Srange code problem!

Hi!
Something strange happens with the code Ive wrote.
It doesnt work with the both tasks, but separated they are absolutely workable.
Does anybody know the problem?Thanks
#include "FreeRTOS.h"
#include "task.h"
#include <avr/io.h>
#include <avr/interrupt.h>
ISR (TIMER0_COMP_vect) 
{ 
      PORTB &= ~(1<<PB3);   //clear output 
} 
ISR (TIMER0_OVF_vect) 
{ 
      PORTB |= (1<<PB3);   //set output 
} 
///////////////////////////////////////////////////////////////////////////////////////
void vServo( void *pvParameters )
{
for (;;)
{
 OCR0 = 35;                     
 vTaskDelay( 500 / portTICK_RATE_MS); 
 OCR0 = 22;                     
 vTaskDelay( 500 / portTICK_RATE_MS); 
 OCR0 = 10;                     
 vTaskDelay( 500 / portTICK_RATE_MS); 
}
}
/////////////////////////////////////////////////////////////////////////////////////
void vMotor1( void *pvParameters )
{
PORTC |= _BV(PC2);                  
PORTC &= ~_BV(PC3);             
PORTC &= ~_BV(PC4); 

for (;;)
{ 
    PORTC |= _BV(PC3);                  
 vTaskDelay( 1000 / portTICK_RATE_MS); 
    PORTC &= ~_BV(PC3);                 
 vTaskDelay(1000 / portTICK_RATE_MS);   
    PORTC |= _BV(PC4);                  
 vTaskDelay( 1000 / portTICK_RATE_MS);   
    PORTC &= ~_BV(PC4);                 
 vTaskDelay( 1000 / portTICK_RATE_MS); 
    
}
}
////////////////////////////////////////////////////////////////////////////////////////
int main( void )
{
 DDRB |= (1<<DDB3);
 DDRC = 0b11111100;
 TCCR0  = (1<<WGM00)|(1<<WGM01)|(1<<CS02)|(1<<CS00)|(1<<COM01);   //fast pwm,TOP=0xff presc 1024 
 TIMSK  = (1<<OCIE0)|(1<<TOIE0); //Enable interrupts 
 ICR1    = 160;      //period 20 ms 
 sei();              //set global interrupt bit 
 xTaskCreate( vServo, 
             (signed char * ) "Servo", 
             configMINIMAL_STACK_SIZE, 
             NULL, 
             1,
             NULL );
 xTaskCreate( vMotor1, 
             (signed char *) "Motor1", 
             configMINIMAL_STACK_SIZE,  
             NULL,  
             1,
             NULL );  
 vTaskStartScheduler();
 return 0;
}

Srange code problem!

What doesn’t work? If you can create both tasks separately but not both together then it might be your configTOTAL_HEAP_SIZE setting is too small.

Srange code problem!

the configTOTAL_HEAP_SIZE is already 1500!!!
the code doesnt work, i mean it compiles but works wrong.
the second task(Motor1) doesnt work at all and the first task(Servo) generates PWM but with only one value, which i didnt set.
that is a problem.

Srange code problem!

is anybody here?

Srange code problem!

Could you post your FreertosConfig.h file?

Srange code problem!

of course!=)
#ifndef FREERTOS_CONFIG_H
#define FREERTOS_CONFIG_H
#include <avr/io.h>
/*-----------------------------------------------------------
 * Application specific definitions.
 *
 * These definitions should be adjusted for your particular hardware and
 * application requirements.
 *
 * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
 * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE. 
 *
 * See http://www.freertos.org/a00110.html.
 *----------------------------------------------------------*/
#define configUSE_PREEMPTION        1
#define configUSE_IDLE_HOOK         0
#define configUSE_TICK_HOOK         0
#define configCPU_CLOCK_HZ          ( ( unsigned long ) 16000000 )
#define configTICK_RATE_HZ          ( ( portTickType ) 1000 )
#define configMAX_PRIORITIES        ( ( unsigned portBASE_TYPE ) 4 )
#define configMINIMAL_STACK_SIZE    ( ( unsigned short ) 1500 )
#define configTOTAL_HEAP_SIZE       ( (size_t ) ( 1500 ) )
#define configMAX_TASK_NAME_LEN     ( 10 )
#define configUSE_TRACE_FACILITY         0
#define configUSE_16_BIT_TICKS      1
#define configIDLE_SHOULD_YIELD     1
#define configQUEUE_REGISTRY_SIZE   1
/* Co-routine definitions. */
#define configUSE_CO_ROUTINES       1
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
/* Set the following definitions to 1 to include the API function, or zero
to exclude the API function. */
#define INCLUDE_vTaskPrioritySet             1
#define INCLUDE_uxTaskPriorityGet       1
#define INCLUDE_vTaskDelete             1
#define INCLUDE_vTaskCleanUpResources        1
#define INCLUDE_vTaskSuspend            1
#define INCLUDE_vTaskDelayUntil         1
#define INCLUDE_vTaskDelay              1
#endif /* FREERTOS_CONFIG_H */

Srange code problem!

the second task(Motor1) doesnt work at all
What do you mean does not work?  The task does not start?  The task starts but never gets any CPU time?  The task runs at the expected times but does not generate any output?  Etc… Regards.

Srange code problem!

i dont know if the task starts, but the outputs for motors are logic 0

Srange code problem!

I believe the task stacks are allocated from the HEAP. Each stack is set for 1500 while your heap is set to 1500 – that won’t work. You also need RAM for the tasks themselves and any message Qs. You shouldn’t need stacks that big – try 400 bytes instead. Put your heap size up to 5K (if you have the memory). In addition, you should always use the Stack overflow and memory allocation application hooks – they will tell you immediately if you haven’t allocated enough memory. Add the following to your FreeRTOSConfig.h file;’ #define configUSE_MALLOC_FAILED_HOOK 1
#define configCHECK_FOR_STACK_OVERFLOW     2 The stack checking will slow the system slightly but start with it until you have a stable system. In main, you will need to implement: void vApplicationMallocFailedHook (void) and void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ) Regards

Srange code problem!

oh its works!!!!=) thank you very much for such a useful answer=)
can you explain me please which influence has a stack size?ive tried to run 4 tasks with 200 bytes of stack and it works, but with with 400 bytes it stops. Why does it happen?
the max heap size to run the tasks of my ATmega32 is 3850 bytes, but i dont know why.i havent found any information in the datasheet. i need to run 10 or more tasks in one moment, is it possible?
and can you give me please a simple example of using this hooks? i mean the main file.
Regards.

Srange code problem!

This simply sends a text message out the serial port. void vApplicationMallocFailedHook (void)
{
    const char *stackStr = “RTOS out of Heap”;
    char buff ;
    char *p = (char *)stackStr;
    int i;
    for (i = 0 ; i < 16 ; i++)
    {
        buff _ = *p++;
    }
    buff  = 0;
   UartSend ((const char *)buff);
} If you have a debugger with break point capability, put a break point in the function. All you want to know is when it fails. You could also simply turn a GPIO on or drive an LED. Keep increasing the heap size (see below) until it stops blowing up. 4 stacks at 400 bytes each is 1600 bytes. If your heap is less than that it will blow up. Don’t confuse the linker generated heap with the RTOS heap. When using the RTOS, you can set the linker heap size to 0 (or whatever minimum is allowed) – I have mine set to 8. because it won’t accept 0 as valid. The FreeRTOS heap is where the stacks are allocated from –  so in FreeRTOSConfig.h, you want: #define configTOTAL_HEAP_SIZE       ( ( size_t ) ( xx * 1024 ) ) where xx is something large depending on the amount of RAM your processor has. You can always trim this back once you have got all your tasks up and running. Use the API uxTaskGetStackHighWaterMark (taskHandle) to get the maximum size each tasks Q reached. If it gets close to the size you defined then increase the stack size. (You need to add #define INCLUDE_uxTaskGetStackHighWaterMark 1 to FreeRTOConfig.h to use this API.
Once you’ve made the changes to FreeRTOSConfig.h, re-post it so I can check it.
Regards _

Srange code problem!

oh thank you very much=)you are the first man who answered all my beginners questions=)
I will try it tomorrow and will also answer how it goes=)

Srange code problem!

Post 2 gave you the answer, but was vague because the description of your problem was vague, and remained vague throughout this thread. http://www.freertos.org/a00111.html
http://www.freertos.org/FAQ-how-to-use-the-FreeRTOS-support-forum.html

Srange code problem!

Ok ive read all you have wrote, now i have more questions as at the beginning=)
1) I have added void vApplicationMallocFailedHook (void) task to my main code, i dont know if it works. What will show me this task? When will it work?
2) When i am adding this line to the config file, there are some warnings and errors by compiling, so the code doesnt compiles. Why does it happen and wherefor do i need this line? How can I use it?
3) I have some problems with tasks again…=( The RAM of my ATmega32 is 2K, so as i understand the max HEAP Size can be 2K*1024 so 2048 byte? I added some more tasks and now I am trying to run 7 at the ame time. Of course it doesn work. I have counted this way: i have maximum HEAP SIZE of 2048 bytes so 2048/7tasks=295,6bytes for each of tasks? It doesnt work!=(
4) I didnt undestand how can I use the function uxTaskGetStackHighWaterMark (taskHandle). What will this give me and what can I do with this?
Here are all the changes I have made in config file and in main.c
#ifndef FREERTOS_CONFIG_H
#define FREERTOS_CONFIG_H
#include <avr/io.h>
/*-----------------------------------------------------------
 * Application specific definitions.
 *
 * These definitions should be adjusted for your particular hardware and
 * application requirements.
 *
 * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
 * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE. 
 *
 * See http://www.freertos.org/a00110.html.
 *----------------------------------------------------------*/
#define configUSE_PREEMPTION        1
#define configUSE_IDLE_HOOK         0
#define configUSE_TICK_HOOK         0
#define configCPU_CLOCK_HZ          ( ( unsigned long ) 16000000 )
#define configTICK_RATE_HZ          ( ( portTickType ) 1000 )
#define configMAX_PRIORITIES        ( ( unsigned portBASE_TYPE ) 4 )
#define configMINIMAL_STACK_SIZE    ( ( unsigned short ) 290 )
#define configTOTAL_HEAP_SIZE       ( (size_t ) ( 2048 ) )
#define configMAX_TASK_NAME_LEN     ( 10 )
#define configUSE_TRACE_FACILITY         0
#define configUSE_16_BIT_TICKS      1
#define configIDLE_SHOULD_YIELD     1
#define configQUEUE_REGISTRY_SIZE   1
    #define configUSE_MALLOC_FAILED_HOOK 1                  //new added
    #define INCLUDE_uxTaskGetStackHighWaterMark 1
/* Co-routine definitions. */
#define configUSE_CO_ROUTINES       1
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
/* Set the following definitions to 1 to include the API function, or zero
to exclude the API function. */
#define INCLUDE_vTaskPrioritySet             1
#define INCLUDE_uxTaskPriorityGet       1
#define INCLUDE_vTaskDelete             1
#define INCLUDE_vTaskCleanUpResources        1
#define INCLUDE_vTaskSuspend            1
#define INCLUDE_vTaskDelayUntil         1
#define INCLUDE_vTaskDelay              1
#endif /* FREERTOS_CONFIG_H */
and the main.c
#include "FreeRTOS.h"
#include "task.h"
#include <avr/io.h>
#include <avr/interrupt.h>
ISR (TIMER0_COMP_vect) 
{ 
      PORTB &= ~(1<<PB3);   //clear output 
} 
ISR (TIMER0_OVF_vect) 
{ 
      PORTB |= (1<<PB3);   //set output 
} 
ISR (TIMER2_COMP_vect) 
{ 
      PORTD &= ~(1<<PD7);   //clear output 
} 
ISR (TIMER2_OVF_vect) 
{ 
      PORTD |= (1<<PD7);   //set output 
} 
///////////////////////////////////////////////////////////////////////////////////////
void vApplicationMallocFailedHook (void)
{
 for (;;)
{
  PORTC ^= (1 << PC1);
}  
}
//////////////////////////////////////////////////////////////////////////////////////
void vServo1( void *pvParameters )
{
for (;;)
{
 OCR0 = 35;                     
 vTaskDelay( 500 / portTICK_RATE_MS); 
 OCR0 = 22;                     
 vTaskDelay( 500 / portTICK_RATE_MS); 
 OCR0 = 10;                     
 vTaskDelay( 500 / portTICK_RATE_MS); 
}
}
/////////////////////////////////////////////////////////////////////////////////////
void vServo2( void *pvParameters )
{
for (;;)
{
 OCR2 = 35;                     
 vTaskDelay( 500 / portTICK_RATE_MS); 
 OCR2 = 22;                     
 vTaskDelay( 500 / portTICK_RATE_MS); 
 OCR2 = 10;                     
 vTaskDelay( 500 / portTICK_RATE_MS); 
}
}
/////////////////////////////////////////////////////////////////////////////////////
void vMotor1( void *pvParameters )
{
PORTC |= _BV(PC2);                  
PORTC &= ~_BV(PC3);             
PORTC &= ~_BV(PC4); 

for (;;)
{ 
    PORTC |= _BV(PC3);                  
 vTaskDelay( 1000 / portTICK_RATE_MS); 
    PORTC &= ~_BV(PC3);                 
 vTaskDelay(1000 / portTICK_RATE_MS);   
    PORTC |= _BV(PC4);                  
 vTaskDelay( 1000 / portTICK_RATE_MS);   
    PORTC &= ~_BV(PC4);                 
 vTaskDelay( 1000 / portTICK_RATE_MS); 
    
}
}
////////////////////////////////////////////////////////////////////////////////////////
void vMotor2( void *pvParameters )
{

PORTC |= _BV(PC6);
PORTC &= ~_BV(PC5);             
PORTC &= ~_BV(PC7); 
portTickType xLastWakeTime;
xLastWakeTime = xTaskGetTickCount;

for (;;)
{   
    PORTC |= _BV(PC5);                  
 vTaskDelayUntil(&xLastWakeTime, 500 / portTICK_RATE_MS);   
    PORTC &= ~_BV(PC5);                 
 vTaskDelayUntil(&xLastWakeTime, 500 / portTICK_RATE_MS);   
    PORTC |= _BV(PC7);                      
 vTaskDelayUntil(&xLastWakeTime, 500 / portTICK_RATE_MS);   
    PORTC &= ~_BV(PC7);                 
 vTaskDelayUntil(&xLastWakeTime, 500 / portTICK_RATE_MS);
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////
void vRedLED( void *pvParameters )
{
portTickType xLastWakeTime;
xLastWakeTime = xTaskGetTickCount;
for (;;)
{
  PORTC ^= (1 << PC1);
  vTaskDelayUntil(&xLastWakeTime, 200 / portTICK_RATE_MS);
}
}
///////////////////////////////////////////////////////////////////////////////////////
void vGreenLED( void *pvParameters )
{
portTickType xLastWakeTime;
xLastWakeTime = xTaskGetTickCount;
for (;;)
{
  PORTC ^= (1 << PC0);
  vTaskDelayUntil(&xLastWakeTime, 100 / portTICK_RATE_MS);
}
}
/////////////////////////////////////////////////////////////////////////////////////////////
void vBeep( void *pvParameters )
{
portTickType xLastWakeTime;
xLastWakeTime = xTaskGetTickCount;
for (;;)
{
  PORTB ^= (1 << PB4);
  vTaskDelayUntil(&xLastWakeTime, 100 / portTICK_RATE_MS);
}
}
//////////////////////////////////////////////////////////////////////////////////////
int main( void )
{
 DDRB = 0b00011000;
 DDRC = 0b11111111;
 DDRD = 0b10000000;
 TCCR0  = (1<<WGM00)|(1<<WGM01)|(1<<CS02)|(1<<CS00)|(1<<COM01);   //fast pwm,TOP=0xff presc 1024 
 TIMSK  = (1<<OCIE0)|(1<<TOIE0); //Enable interrupts 
 TCCR2  = (1<<WGM20)|(1<<WGM21)|(1<<CS22)|(1<<CS21)|(1<<CS20)|(1<<COM21);   //fast pwm,TOP=0xff presc 1024 
 TIMSK  = (1<<OCIE2)|(1<<TOIE2); //Enable interrupts 
 ICR1    = 160;      //period 20 ms 
 sei();              //set global interrupt bit 
 xTaskCreate( vServo1, 
             (signed char * ) "Servo1", 
             configMINIMAL_STACK_SIZE, 
             NULL, 
             1,
             NULL );
 xTaskCreate( vServo2, 
             (signed char * ) "Servo2", 
             configMINIMAL_STACK_SIZE, 
             NULL, 
             1,
             NULL );
 xTaskCreate( vMotor1, 
             (signed char *) "Motor1", 
             configMINIMAL_STACK_SIZE,  
             NULL,  
             1,
             NULL );  
 xTaskCreate( vMotor2, 
             (signed char *) "Motor2", 
             configMINIMAL_STACK_SIZE,  
             NULL,  
             1,  
             NULL ); 

 xTaskCreate( vRedLED, 
             (signed char *) "RedLED", 
             configMINIMAL_STACK_SIZE,  
             NULL,  
             1,  
             NULL );  
 xTaskCreate( vGreenLED, 
             (signed char * ) "GreenLED", 
             configMINIMAL_STACK_SIZE, 
             NULL, 
             1, 
             NULL );
 xTaskCreate( vBeep, 
             (signed char * ) "Beep", 
             configMINIMAL_STACK_SIZE, 
             NULL, 
             1, 
             NULL );
 vTaskStartScheduler();
 return 0;
}
Excuse me please for huge amount of questions, I am 15 and C with FreeRTOS is something new for me=)
I will be very grateful for your answer=)
Regards.

Srange code problem!

1) I have added void vApplicationMallocFailedHook (void) task to my main code, i dont know if it works. What will show me this task? When will it work?
This page has a brief comment:
http://www.freertos.org/a00016.html You can also check the return value of xTaskCreate() to know if the task was created or not.
2) When i am adding this line to the config file, there are some warnings and errors by compiling, so the code doesnt compiles. Why does it happen and wherefor do i need this line? How can I use it?
Please don’t leave me guessing…what are the errors and warnings that are produced?
3) I have some problems with tasks again…=( The RAM of my ATmega32 is 2K, so as i understand the max HEAP Size can be 2K*1024 so 2048 byte? I added some more tasks and now I am trying to run 7 at the ame time. Of course it doesn work. I have counted this way: i have maximum HEAP SIZE of 2048 bytes so 2048/7tasks=295,6bytes for each of tasks? It doesnt work!=(
Just like the heap allocated by a compiler/linker cannot use all the RAM on your microcontroller in a single threaded application, the heap managed by FreeRTOS cannot consume all the RAM on your microcontroller in a multi threaded application.  Some RAM is required to be used by the stack of main(), more for global variables, more for static variables, etc – the heap can only use what is left.
4) I didnt undestand how can I use the function uxTaskGetStackHighWaterMark (taskHandle). What will this give me and what can I do with this?
http://www.freertos.org/uxTaskGetStackHighWaterMark.html Regards.

Srange code problem!

1)Understand, i have added this task to my code, but it doesnt work, the LED doesnt blinks. Does it mean that I have no problems with HEAP ir that I have wrong code?
For cheking  the return value of xTaskCreate()  I should make one more task, right?
2)The errors are following:
Build started 6.2.2013 at 12:23:54
avr-gcc -I"D:InstallFreeRTOSV7.3.0FreeRTOSProjectsSUMOFreeRTOSmain......Sourceinclude" -I"D:InstallFreeRTOSV7.3.0FreeRTOSProjectsSUMOFreeRTOSmain......SourceportableGCCATMega323" -I"D:InstallFreeRTOSV7.3.0FreeRTOSProjectsSUMOF
reeRTOSmain."  -mmcu=atmega32 -Wall -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT main.o -MF dep/main.o.d  -c  ../main.c
../main.c: In function 'vMotor2':
../main.c:93: warning: assignment makes integer from pointer without a cast
../main.c: In function 'vRedLED':
../main.c:114: warning: assignment makes integer from pointer without a cast
../main.c: In function 'vGreenLED':
../main.c:125: warning: assignment makes integer from pointer without a cast
../main.c: In function 'vBeep':
../main.c:136: warning: assignment makes integer from pointer without a cast
avr-gcc -I"D:InstallFreeRTOSV7.3.0FreeRTOSProjectsSUMOFreeRTOSmain......Sourceinclude" -I"D:InstallFreeRTOSV7.3.0FreeRTOSProjectsSUMOFreeRTOSmain......SourceportableGCCATMega323" -I"D:InstallFreeRTOSV7.3.0FreeRTOSProjectsSUMOF
reeRTOSmain."  -mmcu=atmega32 -Wall -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT list.o -MF dep/list.o.d  -c  ../../../../Source/list.c
avr-gcc -I"D:InstallFreeRTOSV7.3.0FreeRTOSProjectsSUMOFreeRTOSmain......Sourceinclude" -I"D:InstallFreeRTOSV7.3.0FreeRTOSProjectsSUMOFreeRTOSmain......SourceportableGCCATMega323" -I"D:InstallFreeRTOSV7.3.0FreeRTOSProjectsSUMOF
reeRTOSmain."  -mmcu=atmega32 -Wall -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT tasks.o -MF dep/tasks.o.d  -c  ../../../../Source/tasks.c
../../../../Source/tasks.c: In function 'xTaskGenericCreate':
../../../../Source/tasks.c:523: warning: cast from pointer to integer of different size
../../../../Source/tasks.c:523: warning: cast to pointer from integer of different size
avr-gcc -I"D:InstallFreeRTOSV7.3.0FreeRTOSProjectsSUMOFreeRTOSmain......Sourceinclude" -I"D:InstallFreeRTOSV7.3.0FreeRTOSProjectsSUMOFreeRTOSmain......SourceportableGCCATMega323" -I"D:InstallFreeRTOSV7.3.0FreeRTOSProjectsSUMOF
reeRTOSmain."  -mmcu=atmega32 -Wall -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT heap_2.o -MF dep/heap_2.o.d  -c  ../../../../Source/portable/MemMang/heap_2.c
avr-gcc -I"D:InstallFreeRTOSV7.3.0FreeRTOSProjectsSUMOFreeRTOSmain......Sourceinclude" -I"D:InstallFreeRTOSV7.3.0FreeRTOSProjectsSUMOFreeRTOSmain......SourceportableGCCATMega323" -I"D:InstallFreeRTOSV7.3.0FreeRTOSProjectsSUMOF
reeRTOSmain."  -mmcu=atmega32 -Wall -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT port.o -MF dep/port.o.d  -c  ../../../../Source/portable/GCC/ATMega323/port.c
avr-gcc -mmcu=atmega32 -Wl,-Map=FreeRTOSmain.map main.o list.o tasks.o heap_2.o port.o     -o FreeRTOSmain.elf
tasks.o: In function `vTaskSwitchContext':
D:InstallFreeRTOSV7.3.0FreeRTOSProjectsSUMOFreeRTOSmaindefault/../../../../Source/tasks.c:1851: undefined reference to `vApplicationStackOverflowHook'
D:InstallFreeRTOSV7.3.0FreeRTOSProjectsSUMOFreeRTOSmaindefault/../../../../Source/tasks.c:1852: undefined reference to `vApplicationStackOverflowHook'
make: *** [FreeRTOSmain.elf] Error 1
Build failed with 2 errors and 6 warnings...
3)Ok, but how can I understand how much RAM is aöready full, and how much RAM can I use for stack? And how much RAM needs each task? Do all of them need  the same quantity of bytes or each task needs own? Do the interrupts need RAM? If so how much? 4)I will try but all the same I dont undestand what gives me this function, how can i use it and where should i put this code
=(((

Srange code problem!

This forum is really for FreeRTOS questions. Questions like “do interrupts use RAM” are fundamental C and hardware questions that have nothing to do with using FreeRTOS. I don’t think people here will be happy to keep answering them. I think you need to become a proficient embedded C programmer and understand how the microcontroller works, how your tools work, and how to debug a program before moving on to using more powerful tools like FreeRTOS. Just my 2c worth.

Srange code problem!

davedoors, i think that every guy on this forum can independently decide if he likes to answer this questions or not. If you dont like do answer them, i cannot make you to do it=)
I agree with you that this forum is especially for FreeRTOS, but is it really so bad, when I am asking for help in the same things here? This is the only place where somebody anwsered me. I dont think that it is bad, when somebody(a beginner)who has the same problems as i have, will find all answers in this discussion. I am not the only in the world who wants to know if the interrupts use RAM=) This information we can become only from professionals as you are=)experience transfer, you know?=)
Regards