Quality RTOS & Embedded Software

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




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