Quality RTOS & Embedded Software

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


Loading

EnterTaskCritical blocking higher priority interrupts

Posted by dwsexton on June 9, 2018

Hi, CPU: STM32F407, FreeRTOS V9.0.0, IDE: Eclipse Software came from CUBEMX I have a real time interrupt running outside of FreeRtos, it uses no system calls. It should run at a 1msec rate. I am using LWIP and when it makes a call to taskEnterCritical() my interrupt stops firing. I have set the priority of the interrupt to 0 (Highest). The configLIBRARYMAXSYSCALLINTERRUPTPRIORITY is set to 5 in FreeRTOSconfig.h So I would think that when the critical section is entered that all interrupts with a priority setting >=5 would be disabled but that my real time interrupt would be allowed to run. In tracing this down this is definately the spot where the interrupt stops getting serviced and what is worse is that since the EnterTaskCritical is nesting my interrupt does not get serviced until the last ExitTaskCritical is called which blocks me out for about 120msec which my application can't stand. I know it's not supposed to work this way but I have yet to be able to figure out what the issue is. Any suggestions?


EnterTaskCritical blocking higher priority interrupts

Posted by rtel on June 9, 2018

Can you post how lwIP is implementing taskEnterCritical(). It should call the FreeRTOS taskENTERCRITICAL(), which will mask interrupts up to configMAXSYSCALLINTERRUPTPRIORITY only. If it is instead just globally disabling interrupts in the core, rather than the NVIC, then that would be the cause of you problem.


EnterTaskCritical blocking higher priority interrupts

Posted by dwsexton on June 9, 2018

Richard, The LWIP function is LOCKTCPIPCORE which calls sysmutexlock which calls osMutexWait which calls xSemaphoreTake which calls xQueueGenericReceive which calls taskEnterCritical which calls the Assembly code in portDisableInterrupts which is defiend as vRaiseBasePri which sets the basePri register. I have no visibility what it is stuffing in there as I have not figured out where the values are comong from, the inline ASM is mov #0,#1 mov basepri,#0


EnterTaskCritical blocking higher priority interrupts

Posted by dwsexton on June 10, 2018

My bad - the issue I have been fighting for the last 2 days was not a code issue at all, it was due to semihosting and the jtag programmer. Once I disabled all semihosting messaging it works flawlessly. File that away in your synapsis for future reference.


EnterTaskCritical blocking higher priority interrupts

Posted by rtel on June 10, 2018

Thanks for taking the time to report back.


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


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

Latest News

FreeRTOS v10.2.1 is available for immediate download. MIT licensed, includes 64-bit RISC-V, NXP Cortex-M33 demo & Nuvoton Cortex-M23 demo.

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

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

Cadence Tensilica Cortes

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Mediatek

Renesas

RISC-V

SiFIve RISC-V

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