Quality RTOS & Embedded Software

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


2nd task switch fails.. arm9

Posted by olibats on August 16, 2007

i have an at91sam9, which has no port available yet. so i took the sam7 one and try to modify it to fit the new cpu.
(once done, i could provide the portation to have it included in freertos)

until today i have the tick-timer running and a single task is running well. if i start calling taskYIELD() to get a task switch the first switch is done well. but: if this tasks calls a taskYIELD() then my program exits into the swihandler so some sort of SWI error occured. unforunatly i have no idea about what could be the reason.

could this be a result of a stack problem? or is the swi interrupt failing?


RE: 2nd task switch fails.. arm9 *correction*

Posted by olibats on August 16, 2007
Hey there!

i forgot about my testing code, which allowed me to switch 1 time by force ;)
so the problem is, that NO tast switch is done and the swi_handler (exception) occurrs.

RE: 2nd task switch fails.. arm9

Posted by olibats on August 16, 2007
Hey there again!

i have the task switching running using a provisional solution. the problem is, that within the portISR.c the swi isr vPortYieldProcessor() was not called, although SWI commands were executed. instead it went into that handler error.

if the isr including its prototype is moved to my main.c it will work. BUT: in the meantime my tick-counter stopped ticking.
is there any chance it got influenced by the SWI related stuff?

RE: 2nd task switch fails.. arm9

Posted by Dave on August 16, 2007
I'm not sure that I understand what you are saying.

Have you -

i/ Installed the SWI handler in the vector table.
ii/ Installed the tick handler to be vectored to directly - that is without any code executing between the interrupt occurring and portSAVE_CONTEXT code executing. Some startup files perform some magic first, you definitely don't want this.

RE: 2nd task switch fails.. arm9

Posted by olibats on August 17, 2007

i/ do you know how to initialize that? yet i did not do anything here.

ii/ the tick handler is installed using __attribute__((naked)) so, afaik there is no code executed upon enter. first order within that isr is portSAVE_CONTEXT().

[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS v10.2.0 is available for immediate download. MIT licensed, and including RISC-V and ARMv8-M (Cortex-M33) demos.

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Cadence Tensilica Cortes

Espressif ESP32

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

Xilinx Microblaze and Zynq partner