Quality RTOS & Embedded Software

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


tp Initialization for new task (RH850/V850)

Posted by d0miller on January 11, 2018

Can anyone explain to me why the tp/R05 register is initialized to 0x55555555 for newly created tasks, by pxPortInitialiseStack() in port.c in SourceportableIARV850ES (9.0.0)? Is there any reason tasks should use a different tp value than that initialized at system startup?

After considerable experimenting and tweaking, I got multitasking working with the original value initialized for new processes. I then added Bull's Eye Coverage, which reads word values from memory based on tp. Since tp is odd, it generates a Misalignment exception and crashes multitasking.

I commented out the instruction that sets tp in portRESTORE_CONTEXT, so that tasks keep the same tp as system, to test. Multitasking is again functioning properly, but I'm concerned that there may have been a reason to use different tp for tasks.

tp Initialization for new task (RH850/V850)

Posted by rtel on January 11, 2018

Sorry, but I'm not following completely. The only place I can find 0x55555555 used in the port is on line 115 of port.c here https://sourceforge.net/p/freertos/code/HEAD/tree/trunk/FreeRTOS/Source/portable/IAR/V850ES/port.c

That sets R05 to a known value at the time the task is created only, which is only done assist development in that it enables the developer to check the expected value ends up in the expected register. The values is actually arbitrary and could be anything.

Does something need to be changed?

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


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


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