Quality RTOS & Embedded Software

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


SAM7 IAR demo fails at restart

Posted by Nobody/Anonymous on August 23, 2005
I have the sam7s-ek evaluation board, and I run the freeRTOS demo for this. I can build it and load it into flash and run: runs OK. I can stop it using the debugger, and run again: OK. But, if I reset it with the debugger it will crash on restart, shortly after line "AT91C_BASE_AIC->AIC_EOICR = 0;"

Any explanations and solutions?

Thanks in advance

RE: SAM7 IAR demo fails at restart

Posted by Nobody/Anonymous on August 23, 2005
Try removing the line. It might not be needed with later IAR releases.

Also check what your JTAG startup script is doing. Does it disable interrupts before the code starts. It could be that the timer interrupt is still running when you reset the code.

RE: SAM7 IAR demo fails at restart

Posted by Jokke on August 23, 2005
I tried to remove the line, and nothing worked. I have also made the guess that some interrupt is pending. I will have a special look at timer.

RE: SAM7 IAR demo fails at restart

Posted by Jokke on September 20, 2005
Now I tried to add things to IAR:s startup code:
*AT91C_AIC_IDCR = 0xffffffff;// disable all irq
*AT91C_AIC_ICCR = 0xffffffff; // clear all pending irq:s
last in the function "AT91F_LowLevelInit", in CStartup_SAM7.c.
This disables all interrupts, and resets any pending ones. And it helps!


RE: SAM7 IAR demo fails at restart FIXED!

Posted by Richard on September 20, 2005
It appears that the macro file used with the J-Link has a function missing. Add the following lines to the file SAM7.mac (if using the SAM7X demo, or equiv for the S demo - just search for a .mac file in the FreeRTOS directory to find the right one).

-- start of code to add
// Reset the AIC upon a software reset.
-- end of code to add

This will then do what is required automatically when you click the reset button on the IDE.

[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

Version 10.1.0 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