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

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 ]    [ 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