FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [August 2007 Threads] 2nd task switch fails.. arm9Posted 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.. arm9Posted 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.. arm9Posted 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.. arm9Posted 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().
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|