UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor rwwerner
Visitor
14,913 Views
Registered: ‎01-23-2016

Access GPIO from remote processor running FreeRTOS in OpenAMP design

Jump to solution

Hello,

I have created an AMP configuration using a MicroZed board where the master processor is running PetaLinux and the remote processor is running FreeRTOS.  This design is based off the proxy_app example and successfully boots both processors and executes code on both processors that communicate using the mechanisms from the example.  In addition, I am able to control custom QSPI blocks instantiated within the PL section of the Zynq from the remote process and receive interrupts for these peripherals in the remote processor.

 

I need to be able to control several GPIOs from the remote processor and I am unable to do this.  I first started with GPIOs that are routed to EMIO, but had no luck.  I then went back to attempt to use the LED GPIO (on MIO47) on the MicroZed and that fails as well.  If I use the same code in a stand-alone project (non-AMP with FreeRTOS code running on processor 0), I can successfully control all the EMIOs, but porting that code to the AMP design does not allow any GPIO control.

 

Is there some initialization that must be done to allow access to the PS peripherals such as the GPIO or others to be accessed by the remote processor in this configuration?

 

All tools and Petalinux are version 2015.4.

 

Thanks in advance for any help anyone can provide.

 

Regards,

Ron

 

0 Kudos
1 Solution

Accepted Solutions
Visitor rwwerner
Visitor
22,827 Views
Registered: ‎01-23-2016

Re: Access GPIO from remote processor running FreeRTOS in OpenAMP design

Jump to solution

Solved.  

 

The GPIOs needed to have entries in the device tree. I added one for the LED on MIO47 as follows:

gpio-leds {
compatible = "gpio-leds";
led-user47 {
label = "led-user47";
gpios = <&gpio0 47 0>;
};
};

And my custom GPIOs on EMIO:
gpio {
adc-gpio0 {
label = "adc-gpio0";
gpios = <&gpio0 54 0>;
};
adc-gpio1 {
label = "adc-gpio1";
gpios = <&gpio0 55 0>;
};
};

Evidently these are needed on the PetaLinux side to enable them for the remote processor. I'm guessing this enables clocks to the devices.

0 Kudos
2 Replies
Visitor rwwerner
Visitor
22,828 Views
Registered: ‎01-23-2016

Re: Access GPIO from remote processor running FreeRTOS in OpenAMP design

Jump to solution

Solved.  

 

The GPIOs needed to have entries in the device tree. I added one for the LED on MIO47 as follows:

gpio-leds {
compatible = "gpio-leds";
led-user47 {
label = "led-user47";
gpios = <&gpio0 47 0>;
};
};

And my custom GPIOs on EMIO:
gpio {
adc-gpio0 {
label = "adc-gpio0";
gpios = <&gpio0 54 0>;
};
adc-gpio1 {
label = "adc-gpio1";
gpios = <&gpio0 55 0>;
};
};

Evidently these are needed on the PetaLinux side to enable them for the remote processor. I'm guessing this enables clocks to the devices.

0 Kudos
Visitor mbrainin
Visitor
11,626 Views
Registered: ‎07-09-2015

Re: Access GPIO from remote processor running FreeRTOS in OpenAMP design

Jump to solution

Hi,

 

I was curious if you were able to route any interrupts signals from the PL to the remote processor.

I have some AXI GPIOs that use the PS-PL interrupt signals and I cannot seem to get them past the linux processor (cpu 0). I wasn't sure if the interrupts get routed to the remote processor only for PS peripheral signals.

 

Thanks,

MIsha

 

0 Kudos