Quality RTOS & Embedded Software

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


Loading

Difference between FreeRTOS examples for CM0

Posted by Safwat Mostafa on December 18, 2012
Hi,
I am working on a LPCXpresso 1227 board, which is a M0 device.
Looking at the official demo provided with FreeRTOS for other M0 devices(LPC1114 and STM32F051) I don't see the following parameters in the "FreeRTOSConfig.h" file.

#define configKERNEL_INTERRUPT_PRIORITY
#define configMAX_SYSCALL_INTERRUPT_PRIORITY


The documentations describes a reference method for handling interrupts by using semaphores to sync a task with the ISR and use portEND_SWITCHING_ISR().

My confusion arises when i look at the LPCXpresso support site over at NXP, where they are providing demos which make use of the configKERNEL_INTERRUPT_PRIORITYand configMAX_SYSCALL_INTERRUPT_PRIORITY (at least they are defined in FreeRTOSConfig.h)

Another difference is that they dont include the following mapping...

 #define vPortSVCHandler      SVC_Handler
#define xPortPendSVHandler PendSV_Handler
#define xPortSysTickHandler SysTick_Handler


Which are present in the the official M0 port.

Can someone tell me, are both of them correct?
Why does the NXP demo omit the mapping of the IRQ handlers?
Why are settings for configKERNEL_INTERRUPT_PRIORITY and configMAX_SYSCALL_INTERRUPT_PRIORITY not configurable in the official FreeRTOS port?

I am facing some frequent system hangs when using the LPC1200 Series demo at NXP site, my system uses UART and GPIO interrupts. Might be my code, but I wanted to understand this topic first. Thanks to anyone who helps.

RE: Difference between FreeRTOS examples for CM0

Posted by Richard on December 18, 2012
“Looking at the official demo provided with FreeRTOS for other M0 devices(LPC1114 and STM32F051) I don't see the following parameters in the "FreeRTOSConfig.h" file.

#define configKERNEL_INTERRUPT_PRIORITY
#define configMAX_SYSCALL_INTERRUPT_PRIORITY”


These are not used in M0 ports. They are in M3, M4 and M4F.




“Another difference is that they dont include the following mapping...

#define vPortSVCHandler SVC_Handler
#define xPortPendSVHandler PendSV_Handler
#define xPortSysTickHandler SysTick_Handler


Which are present in the the official M0 port.”


They probably install the handlers directly into the vector table. See item one here http://www.freertos.org/FAQHelp.html

Regards.

RE: Difference between FreeRTOS examples for CM0

Posted by Safwat Mostafa on December 19, 2012
Thanks for the quick reply.

I found that NXP did actually install those handlers directly in the vector table. So that part is understandable.

As for the first question, If M0 port does not require configKERNEL_INTERRUPT_PRIORITY andconfigMAX_SYSCALL_INTERRUPT_PRIORITY does it mean I can leave my peripheral interrupt priorities at their default level (which is the maximum)?

I have interrupt handlers which makes queue access. So I am using the ISR safe version of the API functions with portEND_SWITCHING_ISR() at the end of the ISR to ensure context switch.

Just want to make sure my concept of using ISR is correct for a m0 port.

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