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

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) 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