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: 
Contributor
Contributor
9,243 Views
Registered: ‎04-16-2008

How to add LED device into my design with petalinux?

Jump to solution

Hi folks:

   I have immegrated petalinux to Sparton3E starter kit board and it works well. Now I want to control LEDS device in Linux,but where is the driver of the device? How can I add the device driver into linux? 

   Thank you in advance.

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Visitor shahradp
Visitor
7,254 Views
Registered: ‎04-04-2008

Re: How to add LED device into my design with petalinux?

Jump to solution

If your hardware was setup correctly then you should see message during kernel boot that says which character device is used for LED. Check the address of LED module in your hardware and the address that was shown on kernel messages to find appropriate characte device name. like /dev/gpio* ...

After that you can use the character device and send data to LEDs ...

 

2 Replies
Contributor
Contributor
9,223 Views
Registered: ‎10-02-2007

Re: How to add LED device into my design with petalinux?

Jump to solution

Hi,

 

GPIO driver source is under the drivers/char/xilinx_gpio directory of petalinux.

By a kernel configuration, if CONFIG_XILINX_GPIO is chosen, a GPIO driver will be linked to a kernel.

It is necessary to set up a GPIO base address by a kernel configuration file correctly.

 

Best Regards,

 

Yoshio Kashiwagi - Nissin Systems

 

0 Kudos
Highlighted
Visitor shahradp
Visitor
7,255 Views
Registered: ‎04-04-2008

Re: How to add LED device into my design with petalinux?

Jump to solution

If your hardware was setup correctly then you should see message during kernel boot that says which character device is used for LED. Check the address of LED module in your hardware and the address that was shown on kernel messages to find appropriate characte device name. like /dev/gpio* ...

After that you can use the character device and send data to LEDs ...