FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [May 2013 Threads] FreeRTOS on a ZYNQ boardPosted by monica on May 1, 2013 Hi
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\");
XTmrCtr_SetHandler(&TimerInstancePtr,axi_timer_handler,&TimerInstancePtr); XTmrCtr_SetResetValue(&TimerInstancePtr,0,0x10000000); XTmrCtr_SetOptions(&TimerInstancePtr,XPAR_AXI_TIMER_0_DEVICE_ID, (XTC_INT_MODE_OPTION|XTC_DOWN_COUNT_OPTION)); } /* -------------------------------------------------------------------------- */
Interrupt Handler
void axi_timer_handler(void *data) { XTmrCtr_Stop(data,0); XTmrCtr_Reset(data,0); 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;
clearIRQhandler(int_no);
Status = XScuGic_Connect(&InterruptController, int_no, (Xil_ExceptionHandler)fce, param); if (Status != XST_SUCCESS) { return; } XScuGic_ClearPending(&InterruptController, int_no); XScuGic_Enable(&InterruptController, int_no); }
RE: FreeRTOS on a ZYNQ boardPosted 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.
Regards.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|