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


at91sam7s256 AT91C_ID_SYS

Posted by avi asaf on April 6, 2009
hello all,

I am trying to activate the DBGU uart peripheral, but its related to the AT91C_ID_SYS which is also
connected to the periodic timer.

the free rtos scheduler is triggered by the the periodic timer and therefore vPortPreemptiveTick is running every time AT91C_ID_SYS occurs.

I would like to add my interrupt procedure of the DBGU uart without changing the real time of the free rtos scheduler.

does any one deal with this issue before?


RE: at91sam7s256 AT91C_ID_SYS

Posted by Dave on April 6, 2009
Search the forum for this, there were some solutions given way back.

RE: at91sam7s256 AT91C_ID_SYS

Posted by Jon Newcomb on April 6, 2009
I found a link to the answer you are looking for, but I sympathise how difficult it is to find information here.
The search does not allow you to view a thread as a whole... like this...
(This link required a bit of detective work!)

Instead, search only returns individual messages like this...

Anyhow, it explains how I modified some files to get the desired result..
Good luck.

RE: at91sam7s256 AT91C_ID_SYS

Posted by Jon Newcomb on April 6, 2009
And to answer your question specifically, I can't see a way to add DBGU support without modifying some of the FreeRTOS files.

The information in the linked post tells you the required changes. You also need to setup the DBGU hardware and write the body of the UartDbguIsr()

Look at how uart0 & uart1 are setup and handled, it’s mostly a copy of what is done here with a few bits chopped out.

RE: at91sam7s256 AT91C_ID_SYS

Posted by Adam Turowski on April 6, 2009
You don't have to modify FreeRTOS kernel. You can do this like that:

void vSysIsr(void) __attribute__ ((naked));
void vSysIsr(void)
"push {r0}" "\n\t" \
/* AT91C_PITC_PISR register address to r0 */ \
"ldr r0,=0xFFFFFD34" "\n\t" \
"ldr r0,[r0]" "\n\t" \
/* now content of AT91C_PITC_PISR register is in r0 */ \
"tst r0,#1" "\n\t" \
/* test bit PITS in the register */ \
"pop {r0}" "\n\t" \
/* jump to vPreemptiveTick if it is PIT interrupt */ \
"bne vPreemptiveTick" "\n\t" \
/* if it is not PIT irq, check the rest of sources */ \
"b vSysIsrRest" "\n\t" \

/// This procedure services all system interrupt sources
/// except PIT interrupt
void vSysIsrRest(void) __attribute__ ((interrupt ("IRQ")));
void vSysIsrRest(void)
// check if interrupt is caused by end of PDC transfer DBGU


RE: at91sam7s256 AT91C_ID_SYS

Posted by Jon Newcomb on April 7, 2009
Opps, forgot to mention the linked example was for the IAR port.

RE: at91sam7s256 AT91C_ID_SYS

Posted by avi asaf on April 7, 2009
hello all

thanks a lot

it was very helpful


[ 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