Questions tagged [freertos]

FreeRTOS is a portable, open source, real-time operating systems for microcontrollers. It also has some support for microprocessors with memory protection units.

FreeRTOS is a portable, open source, real-time operating systems for microcontrollers. It also has some support for microprocessors with memory protection units. It is designed to be small and simple and consists of only 5 C files and a small portability layer per each unique controller/compiler.

Features

  • Portable - supports 18 toolchains
  • Supports many of the commonly used CPU/MCU architectures including x86, ARM, AVR, AVR32, PIC (PIC24, PIC32, dsPIC), 8051, Z80, PowerPC and more

See also

1097 questions
2
votes
1 answer

FreeRTOS crash only in Release

I have this code that crash only in Release: int main() { MyStruct s; s.field = bla; xTaskCreate(TestTask, "TestTask", 2000, &s, 1, 0); // other tasks creation vTaskStartScheduler(); } void TestTask(void *p) { // some delay …
Geob-o-matic
  • 5,940
  • 4
  • 35
  • 41
2
votes
1 answer

Second firmware slot jumps to first slot during FreeRTOS first task run

I've created an application which has 2 firmware slots in its memory mapping. It works pretty fine and both slots are executed correctly based on a 32-bit sequencer number stored in FLASH. The problem appears when I'm trying to use FreeRTOS. By…
VIPPER
  • 326
  • 4
  • 24
2
votes
1 answer

How to measure execution time in FreeRTOS?

I have a version of FreeRTOS which comes with a TraceAlyzer tool and I need to compare how it affects the effectivity of the whole systems (for what time it slows it down). I have 2 simple tasks which run and delay for a short time. I run system…
DK2AX
  • 265
  • 5
  • 16
2
votes
1 answer

freertos queue or mutex

I am new to real time programming and I am trying to practice. In the example I am working on : Task1 must change a variable called frequency periodically and task2 will blink led each time with the new frequency. Should I use mutex on a shared…
Mohamed
  • 57
  • 1
  • 9
2
votes
0 answers

fatal error: FreeRTOSConfig.h: No such file or directory

When I am compiling FreeRTOS for my STM32F103C8T6 I am getting this error : fatal error: FreeRTOSConfig.h: No such file or directory I have all required header and source files and also defined all the Include Paths, but the compiler is still…
Ravi Mali
  • 56
  • 1
  • 6
2
votes
1 answer

CMSIS FreeRTOS dynamic allocation

I'm working on an embedded system that has CMSIS FreeRtos with heap4 as memory management scheme. Now I'm trying to port the mbedTls to my system and I must provide dynamic allocation functions like alloc and free. mbedTLS require two function to…
Federico
  • 1,117
  • 6
  • 20
  • 37
2
votes
4 answers

FreeRTOS STM32 Integrating

I'm trying to start FreeRTOS in exisiting STM32 firmware project. I copied all files, corrected interrupts priority to th elowest. However, processor got stuck in xTaskIncrementTick for loop, it can't go out of that loop. In the same time, all other…
VIPPER
  • 326
  • 4
  • 24
2
votes
2 answers

FreeRTOS timer Tick too fast in SAM L21 Xplained Pro

When I call vTaskDelay, the delay lasts half of the supposed time. I have traced back the problem and I see that the Tick rate value is the double of what it should be as defined in configTICK_RATE_HZ. I checked this using the tick hook to toggle a…
Alvaro Muro
  • 57
  • 2
  • 11
2
votes
1 answer

Handling multiple LwIP connections at the same time using netconn

I try to establish several simultaneous connections using LwIP netconn API (on stm32f4 discovery board). All of them are in their own threads and work perfectly. But for some reason only one connection can be established at the same time. My code is…
Logen Sand
  • 111
  • 3
  • 10
2
votes
2 answers

How can a runtime value be a const?

From the FreeRTOS include/StackMacros.h file: #if( ( configCHECK_FOR_STACK_OVERFLOW > 1 ) && ( portSTACK_GROWTH < 0 ) ) #define taskCHECK_FOR_STACK_OVERFLOW() \ { …
user6995009
2
votes
1 answer

STM32 LwiP Multiple TCP Server

I tried to do a 3 or 4 tcp server on my STM32F107. I'm using freeRTOS and LwIP (and the CubeMX + ST HAL library). I create a task tcp_server, and inside the task, I create 3 netconn structure each with different tcp port. Callback: void…
Bobnono
  • 51
  • 2
  • 9
2
votes
2 answers

Calculation of stack size in FreeRtos or TI rtos

Recently I was working with Rtos and created some tasks to perform my required actions. Although it seems like every time when I create new task with xTaskCreate or TI GUI configuration, I simply try to keep my stack size as much so that the stack…
Ashish
  • 23
  • 1
  • 6
2
votes
2 answers

'Usage fault exception' in ARM Cortex M

I attended a lecture on FreeRtos and Cortex M where the instructor advised that if ISR safe version of API is not used from ISR it can lead to Usage fault exception in Cortex M processors.This would happen because this can involve going from…
Furqan Qadri
  • 47
  • 1
  • 7
2
votes
3 answers

UART Transmit failing after UART Receive thread starts in STM32 HAL Library

I am using STM32F1 (STM32F103C8T6) in order to develop a project using FreeRTOS. The following is my GPIO and USART1 interface configuration: __GPIOA_CLK_ENABLE(); __USART1_CLK_ENABLE(); GPIO_InitTypeDef GPIO_InitStruct; …
mozcelikors
  • 2,582
  • 8
  • 43
  • 77
2
votes
1 answer

A FreeRTOS task suddenly does nothing

I'm developing a real time system with FreeRTOS on an STM3240G board. The system contains some different tasks ( GUI, KB, ModBus, Ctrl, etc . . ) The tasks have different priorities. The GUI seems to display a little slowly. So I use a Profiler…
S.Garber
  • 21
  • 1