Quality RTOS & Embedded Software

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


Loading

FreeRTOS Interrupt with Arduino Due Cortex-M3

Posted by Enayat on March 18, 2013
Hi,
I want to learn about how to implement interrupt in freeRTOS. I am using the Arduino Due SAM3X8E Cortex-M3 microcontroller. Have somebody used an interrupt in freeRTOS which you could share with me. Is there any guide of how to implement interrupt in freeRTOS. I have read alot in the freeRTOS website but I have not found any guide.

RE: FreeRTOS Interrupt with Arduino Due Cortex-M3

Posted by Richard on March 18, 2013
Writing FreeRTOS aware interrupts on a Cortex-M chip is actually very simple as, unlike when doing the same on their ARM7 predecessors, there are not special requirements other than ensuring you have the priorities set correctly. Basically, just write a standard C function and install it in the vector table.

See the "Interrupt Service Routines" section of the following page. Most (if not all) official demos have examples included too.

http://www.freertos.org/Atmel_SAM3_SAM3X-EK_SAM3S-EK2_RTOS_Demo.html

The important bits:

1) If an interrupt is going to use a FreeRTOS API function then, as with all the FreeRTOS ports, only the API functions that end in FromISR can be used (see the last bullet point at the top of the following page for the rationale: http://www.freertos.org/Embedded-RTOS-Queues.html).

2) FreeRTOS Cortex-M ports implement a full interrupt nesting model, the behaviour of which is configured using two FreeRTOSConfig.h constants: configMAX_SYSCALL_INTERRUPT_PRIORITY and configKERNEL_INTERRUPT_PRIORITY. Interrupt safe FreeRTOS functions can only be called from interrupts that have a priority at or below that set by configMAX_SYSCALL_INTERRUPT_PRIORITY (if CMSIS priority functions are being used then configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY).

See http://www.freertos.org/RTOS-Cortex-M3-M4.html for the full explanation.

Regards.


[ 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