> Has freertos a variable to configure the total threads that I
> can create?
No you can continue to create tasks until you run out of heap RAM. Which memory file are you using? Heap_1 and heap_2 are sized using configTOTAL_HEAP_SIZE in FreeRTOSConfig.h.
I am using heap_2, and all of you are right, I decreased the amount of stack to the new thread and it was created without a problem. So my problem is not enough memory.