Quality RTOS & Embedded Software

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




Loading

Zynq Not getting Interrupt

Posted by raymadigan on October 5, 2016

I am using a Zynq processor on a MicroZed board and I am working to incorporate FreeRTOS into the project. I am using DMA to send data from the PS to the PL. The problem I am experiencing is that I don't get the interrupt from the PL when the transfer is complete hence I cannot acknowledge it and the interrupt stays high forever.

I followed the following procedure: I have a minimal bare metal application that sends the packet from the PS to the PL using SimpleTransfer DMA. The application sets up the dma and interrupts to receive the interrupt and I can watch the acknowledgement in an ILA I have setup on the device. I have arranged all of the interrupt and dma setup in a single function so I can just copy it to the FreeRTOS implementation, comment out a few lines and be good.

I got the FreeRTOS blinky demo to work. I removed everything except the blinky code to get the example as simple as possible. I left in the two tasks to turn on and off the led.

I copied this application to a new project and added a semiphore and a new task that fires once when the semiphore fires that sends the dma packet to the PL. I used the interrupt and dma setup procedure that I used in the minimal bare metal app. I can see the interrupt go high in the ILA in the PS and it never goes low. I am not able to acknowledge the interrupt because I get the interrupt in my FreeRTOS implementation.

I have an application that I built 6 months ago that uses the same concept, it is more complicated in that it services DMA from the PL to the PS in scatter gather. It actually had a FreeRTOS task as the interrupt service. This problem I don't need to service the interrupt except to acknowledge that the packet was sent. I look at this old application and cannot seem to see anything different. I am still looking.


Zynq Not getting Interrupt

Posted by raymadigan on October 5, 2016

I found the problem. I use a different name for the XScuGic interrupt controller. It is used in the FreeRTOStickconfig file.


Zynq Not getting Interrupt

Posted by raymadigan on October 10, 2016

I answered this wrong. I am using FreeRTOS v9.0.0 and FreeRTOSLabs 160919. I used the base demo for the zynq and TCPandFat. In the file FreeRTOStick_config.c the function vConfigureTickInterrupt has a static instance of the XScuGic interrupt controller as a local variable. This function assumes that noone else will be using the interrupt controller, it reinitializes the interrupt controller. The interrupt controller state is lost and any previous defined interrupts will not be services.

This function should have an extern XScuGic xInterruptController.

and the interrupt controller defined in main. This is how the FreeRTOS demo for the zynq is setup. Otherwise this change will have to be made for every release by anyone who uses the TCP connectivity.


Zynq Not getting Interrupt

Posted by rtel on October 11, 2016

Thanks for the info - I think (as you suggest) this was changed for the Zynq demo in the main FreeRTOS download, but evidently not in the labs download.


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




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

Latest News

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


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

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