Quality RTOS & Embedded Software

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


Loading

ARM Cortex-M mutex instructions

Posted by nelsonpina on October 31, 2016

Hey guys,

let's say I need to use a mutex in my driver layer and I don't want to use FreeRTOS calls that deep in my code (to keep the drivers independent from FreeRTOS).

Is there any side effect of using the ARM Cortex-M mutex instructions when using FreeRTOS: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dai0321a/BIHEJCHB.html

I do use the FreeRTOS semaphores and mutex in my application layers, but I want to avoid using them at driver levels.

Thanks a lot!

cheers, n


ARM Cortex-M mutex instructions

Posted by edwards3 on October 31, 2016

FreeRTOS mutexes are heavy as they use the queue code so can have any number of tasks blocked on giving or taking them. They do give you blocking ability and priority inheritance though. Do not use a spin lock on a Cortex instruction because lower priority tasks will be starved and you will get deadlock if a starved task has the lock.


ARM Cortex-M mutex instructions

Posted by nelsonpina on November 2, 2016

Thanks Medwards!


[ 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