Quality RTOS & Embedded Software

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


Loading

2nd task switch fails.. arm9

Posted by olibats on August 16, 2007
hi,

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?

thanks,
christian

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
Hello,

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

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

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

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


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

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