Quality RTOS & Embedded Software

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




Loading

arm/gcc context switch not enabling interrupt

Posted by danilo vendruscolo on March 6, 2008
dear forum,

I have an acquistion interrupt running at SSC with DMA, 4Khz, but I am missing interrupts when I use the Webserver application. The EMAC ISR is takes only 50us, but the RTOS takes 500us or more to listen to the SSC interrupt request.
So my conclusion is that when the EMAC ISR makes a conext switch, it does not enable interrupts after it.
If I do not request the webserver app through an app, I never miss the SSC interrupt.

Am I right ? Is there anyway to re-enable interrupts right after the EMAC ISR has exit ?

I am using LWIP Rowley Demo with yagarto GCC 4.2.2, lwip 1.2.0, freertos 4.7.1

thanks in advance,

danilo

RE: arm/gcc context switch not enabling interrupt

Posted by Dave on March 6, 2008
Every ISR will return to a task and leave interrupts as that task expects to find them.

Is the WEB server generating the page that shows the stats on each task? If so then this uses a critical section and is a very long slow process designed for demo only not production code. It could be causing your problem.

RE: arm/gcc context switch not enabling inter

Posted by danilo vendruscolo on March 6, 2008
actually i´m not using the function vtasklist, that shows the tasks being executed. i have done my own webpage.

thanks

RE: arm/gcc context switch not enabling inter

Posted by danilo vendruscolo on March 7, 2008
i have debugged my application and came to conclusion that the function disabling the interrupt is the lEMACsend, and it is taking almost 500us to execute, that is a lot of time without interrutpts.

Now I will have to figure out how to hack this function so it does not disable the interrupt for so long.

if anyone have any suggestion, I would appreciate it.

thanks

RE: arm/gcc context switch not enabling inter

Posted by danilo vendruscolo on March 7, 2008
ok, i guess I have come to a solution:

i´ve just compared the SAM7_EMAC.c of the eclipse uip port with the Lwip rowley one, and the interrupts are disabled after the last frame to send check, so I´ve made the same thing on the lwip port and I it will fix the problem because the memcpy is the function which is really taking all the time to execute.

I hope this is a safe hack.

thanks,

danilo


[ 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