Quality RTOS & Embedded Software

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


FreeRTOS on a ZYNQ board

Posted by monica on May 1, 2013

I am working with an AMP configuration on a Zynq ZC702 board, based on the FreeRTOS-Linux AMP demo provided by Xilinx (http://www.xilinx.com/support/documentation/sw_manuals/petalinux2012_12/ug978-petalinux-zynq-amp.pdf).

I customized the demo, in order to work with the FPGA fabric. I already use a couple of switches and leds, and the idea now is to configure the axi_timer IP on XPS, which already works, but i haven\'t been successful on the configuration on SDK for my FreeRTOS application (Because the interrupt is never acknowledged)

The timer is configured in FreeRTOS, and if I check the registers associated to the timer, I see that the interrupt is generated (a bit sets to 1), but somehow FreeRTOS doesnt recognize the interrupt...

I will post the code parts related to this topic.. maybe any of you find what am I missing. Thank you in advance.

/* -------------------------------------------------------------------------- */

AXI Timer Configuration:

void prvSetAXITimer( void )
/* Initialize the AXI GPIO driver.*/
/*AXI GPIO configuration*/
xStatus = XTmrCtr_Initialize(&TimerInstancePtr,XPAR_AXI_TIMER_0_DEVICE_ID);
if(XST_SUCCESS != xStatus)
xputs(\"TIMER INIT FAILED \\n\\r\");

/* -------------------------------------------------------------------------- */

Interrupt Handler

void axi_timer_handler(void *data)
InterruptFlag = 1;

/* -------------------------------------------------------------------------- */

Setup IRQs by using the following function:

setupIRQhandler(91, &axi_timer_handler, NULL);

/* -------------------------------------------------------------------------- */

The function setupIRQhandler in the port.c file is:

#define XScuGic_ClearPending(DistBaseAddress, Int_Id) \\
XScuGic_WriteReg((DistBaseAddress), \\
XSCUGIC_PENDING_CLR_OFFSET + ((Int_Id / 32) * 4), \\
(1 << (Int_Id % 32)))

void setupIRQhandler(int int_no, void *fce, void *param)
int Status;


Status = XScuGic_Connect(&InterruptController, int_no,
(Xil_ExceptionHandler)fce, param);
if (Status != XST_SUCCESS) {
XScuGic_ClearPending(&InterruptController, int_no);
XScuGic_Enable(&InterruptController, int_no);

RE: FreeRTOS on a ZYNQ board

Posted by Richard on May 1, 2013
Although this may change shortly, currently the Zynq port is provided by a third party and I don't have access to Zynq hardware so I'm afraid I cannot provide any suggestions.


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

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


FreeRTOS and other embedded software careers at AWS.

Latest News

FreeRTOS kernel V10.0.1 is available for immediate download. Now MIT licensed.

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