Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

Best way of storing state?

Posted by harrywright88 on March 16, 2016

Hi, I'm using FreeRTOS to write code for a music system and need to be able to save several states simultaneously (boot status, play status, source selected etc). Normally I would do this by having a global struct which contains several enums for each state. Is there a different/more appropriate way to accomplish saving states in FreeRTOS? I'm fairly new to the RTOS world, so excuse me if I've missed something obvious here. Many thanks


Best way of storing state?

Posted by rtel on March 16, 2016

I am an advocate of "the simplest way that works" - in this case the only reason not to continue to use the structure would be if multiple tasks need to write to the structure at the same time - in which case you would need to use some form of mutual exclusion primitive to ensure one task does not corrupt what another task is doing.


Best way of storing state?

Posted by harrywright88 on March 17, 2016

thanks for your response, I'll probably implement it as before, but with mutual exclusion.


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner