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

serial_isr.S adaptation for several interrupts

Posted by tronicals on July 17, 2017

Hi all,

It seems I have trouble with my InteruptWrappers interacting with FreeRTOS. I used the serial_isr.S file coming with the demo and extended it for more UARTinterrupts. It compiles fine, it works fine, but after 2 days running and receivig constantly serial data some interrupt are ignored.

I wonder if I made some errors in the serial_isr.S file, because I am not familiar with asm Should : .set nomips16 .set noreorder

be repeated for each interrupt?

Thanks iin advance

~~~

include
include
include "ISR_Support.h"

/U1/ .set nomips16 .set noreorder

.extern vU1InterruptHandler
.extern xISRStackTop
.global	vU1InterruptWrapper

.set	noreorder
.set 	noat
.ent	vU1InterruptWrapper

vU1InterruptWrapper:

portSAVE_CONTEXT
jal vU1InterruptHandler
nop
portRESTORE_CONTEXT

.end	vU1InterruptWrapper

/U2/ .set nomips16 .set noreorder

.extern vU2InterruptHandler
.extern xISRStackTop
.global	vU2InterruptWrapper

.set	noreorder
.set 	noat
.ent	vU2InterruptWrapper

vU2InterruptWrapper:

portSAVE_CONTEXT
jal vU2InterruptHandler
nop
portRESTORE_CONTEXT

.end	vU2InterruptWrapper

/U3/ .set nomips16 .set noreorder

.extern vU3InterruptHandler
.extern xISRStackTop
.global	vU3InterruptWrapper

.set	noreorder
.set 	noat
.ent	vU3InterruptWrapper

vU3InterruptWrapper:

portSAVE_CONTEXT
jal vU3InterruptHandler
nop
portRESTORE_CONTEXT

.end	vU3InterruptWrapper

/U4 - N.A/ /U5/ .set nomips16 .set noreorder

.extern vU5InterruptHandler
.extern xISRStackTop
.global	vU5InterruptWrapper

.set	noreorder
.set 	noat
.ent	vU5InterruptWrapper

vU5InterruptWrapper:

portSAVE_CONTEXT
jal vU5InterruptHandler
nop
portRESTORE_CONTEXT

.end	vU5InterruptWrapper

/U6/ .set nomips16 .set noreorder

.extern vU6InterruptHandler
.extern xISRStackTop
.global	vU6InterruptWrapper

.set	noreorder
.set 	noat
.ent	vU6InterruptWrapper

vU6InterruptWrapper:

portSAVE_CONTEXT
jal vU6InterruptHandler
nop
portRESTORE_CONTEXT

.end	vU6InterruptWrapper

~~~


serial_isr.S adaptation for several interrupts

Posted by rtel on July 23, 2017

Sorry for the delay in your post showing - it went into moderation - which it is not supposed to do.

In future, please give some clues as to which FreeRTOS port you are using. In this case I can work it out because you show some source code.

When you say the interrupt is ignored, can you be more specific. Is it that the interrupt is asserted in the hardware, but the wrapper never executes, or that the wrapper executes and calls the handler, but something in the handler is not working.

If it is the hardware is not asserting the interrupt then you will need to inspect the UART registers to see why that is, maybe it has got itself into an error state.

If the handler is being called but not behaving as you expect then please post the handler code.

Also, in general, do you have configASSERT() defined to ensure execution stops if an assert fails? Do you have stack overflow detection switched on? Are you 100% sure the priorities of the interrupts are at or below configMAXSYSCALLINTERRUPT_PRIORITY?


[ 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