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

(LPC2148) Fast interrupt and vectored interrupt both from timer0 peripherial?

Posted by mikeholtmilch on September 3, 2014

Hello, I would like to use a FIQ for a capture-event (0.2) along with FreeRTOS, which uses a vectored interrupt from timer0 for tick-generation. The LPC2148 manual states: Each peripheral device has one interrupt line connected to the Vectored Interrupt Controller, but may have several internal interrupt flags. So is it possible to register both a fast and a vectored interrupt for timer0? I tried that already but got system freezes. What I also tried was to modify portISR in the following way: if ( T0IR & portTIMERMATCHISR_BIT ) { ... } else { ... } which works, but is not accurate/fast enough. I also cannot use timer1 for the tick-generation, as it is already used for different purposes. I would like to know if I just have to try a little harder or give up the FIQ right away. Any help is greatly appreciated. Thanks, Mike


(LPC2148) Fast interrupt and vectored interrupt both from timer0 peripherial?

Posted by rtel on September 3, 2014

Sorry I'm not sure about the FIQ - but note if you do use the FIQ you should probably not use the FreeRTOS API from the FIQ handler.

You can move the timer used to generate the tick to any peripheral you like. As that is quite an old port there is no way of doing that without actually editing the relevant port.c file directly though. Newer ports either declare the functions used to setup the timer as weak, allowing them to be overridden easily, or callback into the application directly to have that set up the tick.

Regards.


(LPC2148) Fast interrupt and vectored interrupt both from timer0 peripherial?

Posted by mikeholtmilch on September 3, 2014

Thank you for the fast response. Sorry to hear that you do not know about FIQ, as this is what I would preferably do. I just want to start timer1 after the capture event, so no FreeRTOS-API will be used. As for moving to another timer, I cannot, because the other timer is already in use. Just for curiosity: Could I have two normal IRQ for the timer0 peripherial, one which deals with the capture event and the other one which produces the tick for freeRTOS? Regards, Michael


(LPC2148) Fast interrupt and vectored interrupt both from timer0 peripherial?

Posted by rtel on September 3, 2014

Just for curiosity: Could I have two normal IRQ for the timer0 peripherial, one which deals with the capture event and the other one which produces the tick for freeRTOS?

I don't know...in general terms, ignoring any potential hardware conflicts, you should be able to use the FIQ if your not using FreeRTOS API calls in it. Do check the enter/exit critical macros though to ensure they don't disable FIQ as well as IRQ. Also make sure you set up a stack for the FIQ mode as most demos in the FreeRTOS download don't (as the mode is not used by the demo).

Regards.


[ 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