Quality RTOS & Embedded Software

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




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 ]    [ Sitemap ]    [ ]




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

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

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