Jump to content
  • 0

Zedboard Oled Petalinux


Ilesar

Question

Hi,

I'm new in the world of embedded linux and i want to create a program to write words on the Oled display on zedboard. I use Petalinux 2018.2 and apparently the oled driver is not there by default. So i added the drivers created by digilent https://github.com/Digilent/linux-digilent/blob/86b46b6606eea44c59af56b732e5393f2eb0adce/drivers/staging/pmods/pmodoled-gpio.c in a petalinux module.

But now i want to use the functions defined by the driver in a application in order to use later a TCP server to get the words to display in the oled by another device. But i can't made the link between the driver and the application.

Am i using the wrong method ?

Somebody can help me ?

 

Link to comment
Share on other sites

21 answers to this question

Recommended Posts

  • 0

Thank you for your anwer, I got :

root@oled:~#  lsmod | grep gpio
pmodoled_gpio 16384 0 - Live 0xbf000000 (O)

but only after i launch insmod with the path you gave me, otherwise lsmod display nothing.

Edited by Ilesar
Link to comment
Share on other sites

  • 0

Thanks,

i will try that. The device tree file i need to modify is system-user.dtsi, right ?

For the application c code, will i need to add something (like an include) or will the functions of the driver be defined by default ?

Link to comment
Share on other sites

  • 0

Thank you,

I implemented the the pmod oled ip in the following project : image.thumb.png.722d983a2f985ff7fae8accc1e9d1057.png

but when i write the node in system-user.dtsi, following the module readme, i got an error in compilation ( the value are set random for now as i don't know how to find the good ones) :

/include/ "system-conf.dtsi"
/ {
		pmodoled-gpio_instance: pmodoled-gpio@e0010000 {
			compatible = "xlnx,pmodoled-gpio";
			reg = <e0010000 0x1000>;
			interrupt-parent = <&intc>;
			interrupts = < 0 26 4 >;
		};
};

image.png.8f92f35c2d79a1dbe059b812d722297d.png

Do you known where that come from ?

Thank you in advance.

Link to comment
Share on other sites

  • 0

Okay, i found the syntax error, it was the "pmodoled-gpio_instance: " witch shoudn't be there. But now, how do i find the correct values to set in the node ? Is it with Vivado ?

Furthermore, i got this when i launch petalinux :

pmodoled_gpio: loading out-of-tree module taints kernel.                        
platform spi_gpio.2: spi_busnum_to_master(2) returned NULL                      
pmodoled-gpio zed_oled: add_gpio_pmodoled_device_to_bus failed: -38             
pmodoled-gpio: probe of zed_oled failed with error -38  

Could you help me ?

Thanks.

Edited by Ilesar
Link to comment
Share on other sites

  • 0

yes it does, there is the pl code :

/ {
	amba_pl: amba_pl {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "simple-bus";
		ranges ;
		PmodOLED_0: PmodOLED@40000000 {
			compatible = "xlnx,PmodOLED-1.0";
			reg = <0x40000000 0x10000 0x40010000 0x1000>;
		};
	};
};

 

Link to comment
Share on other sites

  • 0

Also notice that PmodOLED IP has no IRQ so none should be specified in device tree.

You can find the parameters for pmodoled node here

Pmods were removed in commit: 3953cedd78464cab

Edited by Ionel
Link to comment
Share on other sites

  • 0

Thanks for your time !

I replaced &gpiops by &gpio0, apparently it is the only one that made the device tree compile, ( otherwise i got system-top.dtb: ERROR (phandle_references): Reference to non-existent node or label "gpiops") but i still have the sames errors that in my previous message when i launch petalinux. I see in the documentation that there are two examples with differents pin numbers. Where i can find the right one for my design ?

 

Thank you !

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...