Quality RTOS & Embedded Software

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


Proper way to reset?

Posted by PBXNewbie on August 31, 2007
I am using FreeRTOS on an Atmel SAM7S-256 with the IAR toolchain. While I have a proprietary board design, we can assume for the moment that I am using the Atmel development kit, as they are very similar.

I am writing a boot loader that is supposed to allow updating the code in the SAM flash. I am writing the new code to an external SPI flash when it is downloaded over USB, doing the appropriate checks to ensure that code is intact. Once it is entirely downloaded and verified, it is then written to the SAM flash. Once done, I am trying to reset the processor. However, I must not understand how to reset correctly, because when I merely make the reset function in Cstartup.s79 public and call it, the RTOS does not appear to start up again. I tried just simply resetting the processor without writing new code to it, to make sure I took any erroneous code update out of the equation. Same result - RTOS locks up.

Can someone help me by describing the correct way to have my code reset the processor, as if it were being first powered up?


RE: Proper way to reset?

Posted by Dave on August 31, 2007
Simply starting the software again from the start is definitely not enough as the processor and its peripherals do not get a reset. This means that the interrupts for the RTOS tick remain enabled, and will continue to trigger while your software is reinitialising all the variables back to their default values, probably also clearing the vector table.

There was a thread about 3 weeks ago where somebody was doing exactly what you are attempting now and I think it had a positive conclusion. From memory it was somebody calling themselves racemouce, you might find it from searching the forum.

RE: Proper way to reset?

Posted by PBXNewbie on August 31, 2007
Thanks. I did not find the post you mentioned. However, I was able to get it to reset the processor properly. For anyone else in my situation, here is the command I found effective in resetting the SAM processor from a function running in RAM.


[ 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