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
5
votes
2 answers

Many-to-one gatekeeper task synchronization

I'm working on a design that uses a gatekeeper task to access a shared resource. The basic design I have right now is a single queue that the gatekeeper task is receiving from and multiple tasks putting requests into it. This is a memory limited…
rjp
  • 1,760
  • 13
  • 15
5
votes
1 answer

STM Nucleo I2C not sending all data

Edit: The solution was to turn down the I2C clock in the initialization block. Although the STM could handle it, the data sheet for the LCD stated it could handle only up to 10kHz. For the DMA there is an IRQ that must be enabled and setup in the…
5
votes
2 answers

Redefining malloc for thread safety in FreeRTOS

Can I do something like this: #ifdef FREERTOS #define malloc(size) pvPortMalloc(size) #define free(ptr) pvPortFree(ptr) #endif and expect it to always call pvPortMalloc() instead of malloc()? Also, what difference would it make putting this…
jayjay
  • 1,017
  • 1
  • 11
  • 23
5
votes
1 answer

AM335x FreeRTOS port, unable to handle IRQs and SWI

I'm currently trying to port FreeRTOS to the TI AM335x processor, best known for being used on the BeagleBones. I am able to boot, run GPIOs and setup a compare match timer for running the system ticks. If I disable interrupts, i can see how the…
henfos
  • 71
  • 6
5
votes
3 answers

FreeRTOS Error with High Speed UART Interrupt in PIC24H

I already used FreeRTOS for some embedded projects for some year time and It worked really perfectly until now. Currently i'm facing a difficult problem related to using High Speed Interrupt in FreeRTOS porting to PIC24H, hope you all can help me to…
5
votes
1 answer

FreeRTOS allocation error

I am using FreeRTOS V6.1.1 on a STM32F107VC and get frequent malloc errors. The heap area is defined in the linker script but it keeps getting stuck in this loop of pvPortMalloc() after a few allocations: while( ( pxBlock->xBlockSize < xWantedSize )…
RootRaven
  • 395
  • 5
  • 14
5
votes
1 answer

Create task with multiple queues in FreeRTOS?

I'm having trouble sending multiple queues to a task in FreeRTOS. I've tried creating a struct to hold them like this: typedef struct { xQueueHandle buttonQueue; xQueueHandle OLEDQueue; } xQueues; and then sending it to the task like…
routeburn
  • 1,156
  • 1
  • 12
  • 27
5
votes
2 answers

Can FreeRTOS taskGetTickCount() not be polled?

I think I either have a) a misunderstanding of the way FreeRTOS taskGetTickCount() function works or b) something not quite right with our port. I have some debugging where I'm showing the output of xTaskGetCount(). Any time I've done a…
Travis Griggs
  • 21,522
  • 19
  • 91
  • 167
4
votes
1 answer

How to cleanly tell a task to die in FreeRTOS

I'm making a light with an ESP32 and the HomeKit library I chose uses FreeRTOS and esp-idf, which I'm not familiar with. Currently, I have a function that's called whenever the colour of the light should be changed, which just changes it in a step.…
Tugzrida
  • 491
  • 2
  • 6
  • 17
4
votes
5 answers

FreeRTOS tasks are not context switching

I'm using FreeRTOS port for PIC32 microcontroller on the PIC32MX starter kit. Was just playing with tasks but the tasks aren't context switching. Here are my main config settings: #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5…
Laz
  • 6,036
  • 10
  • 41
  • 54
4
votes
1 answer

What is the behavioral difference between vTaskDelay and _delay_ms?

1. Introduction I cannot seem to find information or a detailed explanation about the behavioral differences between the following functions in a FreeRTOS task: vTaskDelay _delay_ms 2. Code Suppose you have the following codes: IdleHook + task…
Kamuffel
  • 592
  • 1
  • 6
  • 17
4
votes
1 answer

implementing LWIP multicast on STM32F7 + FreeRTOS?

I have a client/server LWIP program that works correctly with unicast communication however I want to use multicast features so I used IGMP library did the following: 1- in lwipopts.h: #define LWIP_IGMP 1 //allowed IGMP 2- in…
Kalkhouri
  • 341
  • 1
  • 6
  • 16
4
votes
2 answers

FreeRTOS freezes

I have a simple FreeRTOS programm and basically I need to calculate the time it takes to run for a different number of iterations. The problem is that it just freezes and doesn't execute anymore though the iterations are not complete yet and I need…
Margo
  • 348
  • 2
  • 3
  • 13
4
votes
5 answers

freeRTOS and parallel processing

This is a simple question: Does freeRTOS handla multiple threads in multiple processes as the "real" Linux system does?
Dervin Thunk
  • 19,515
  • 28
  • 127
  • 217
4
votes
2 answers

Mocking FreeRTOS functions in gTest

For a project, I'm implementing in c++ on an embedded system a component that get sensors-data via a FreeRTOS queue and process them into a FreeRTOS task. Because the HW did not arrive yet & quality reasons (TDD), I would like to mock the freeRTOS…