Quality RTOS & Embedded Software

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




Loading

Free RTOS - strange behavior on Cortex-M3.

Posted by ravikiranhv on April 26, 2017

Hello experts,

I am working on freeRTOS V9.0 on Cortex M3. I have two application threads and 2 interrupts. Both the threads blocks on event which are posted by interrupts (I am using API ending with ISR from interrupts). Evevryting works fine if I have multiple thread and a single interrupt. Have multiple randomobservation on my setup on each boot.
Case-1: System hangs after starting RTOS. Both threads and Interrupts not working Case-2: Threads are not running but both the interrupts working ! Case-3: Threasds start running automatically after some time (about 60 seconds) after 10/20 interrupt processing Case-4: Everything works fine without any problem

I understood freeRTOS configuration requirement for interrupts from here and everything looks fine ! http://www.freertos.org/FAQHelp.html http://www.freertos.org/a00110.html#kernel_priority

Appreciate your bvaluable feedback :)

Thanks


Free RTOS - strange behavior on Cortex-M3.

Posted by edwards3 on April 26, 2017

Do you have configASSERT() defined? Which M3 are you using and what is configMAXSYSCALLINTERRUPT_PRIORITY set to?


Free RTOS - strange behavior on Cortex-M3.

Posted by ravikiranhv on April 27, 2017

Yes configASSERT() is defined. Our Cortex M3 implements 3 bits(MSB) for priority configMAXSYSCALLINTERRUPTPRIORITY (191) //(i.e. priority 5). configKERNELINTERRUPT_PRIORITY (240)

Both ISR's calling free RTOS API's are set to priority 240.

Please suggets if I am missing anything.

Thanks in advance


Free RTOS - strange behavior on Cortex-M3.

Posted by rtel on April 27, 2017

240 is actually using 4 bits, but that shouldn't matter because the unimplemented bit will be ignored anyway.

Can you please say which chip you are using - if it is an STM32 then you also have to explicitly tell it not to sub-divide the priorities. Are you 100% sure it has three priority bits defined? We have had incidents where documentation on this has been wrong, which is why the head revision Cortex-M code in SVN has additional asserts() to actually measure this to determine if the configuration file settings are correct.


Free RTOS - strange behavior on Cortex-M3.

Posted by ravikiranhv on April 29, 2017

Hi,

Thanks for the inputs.

I am using Max32550 controller from Maxim with 3 bit priority implementation.

Please suggest how to go about.

Appreciate your help


Free RTOS - strange behavior on Cortex-M3.

Posted by rtel on April 30, 2017

Try setting configKERNELINTERRUPTPRIORITY to 224, and if that does not help, update to the latest version of port.c, which contains more configASSERT() statements. Link assumes GCC, and the new asserts assume either _NVICPRIOBITS or configPRIOBITS is set to 3 in FreeRTOSConfig.h: https://sourceforge.net/p/freertos/code/HEAD/tree/trunk/FreeRTOS/Source/portable/GCC/ARM_CM3/


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




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists