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: 
Explorer
Explorer
507 Views
Registered: ‎02-08-2017

Setting LSB using gpiod_set_array_value

Jump to solution

It may be not related to Xilinx chip but I hope I can find support here.

I have ZCU102 board and  implemented AXI-GPIO in ZynqMP.

I have to build my own driver for this GPIO,  I decided to work with GPIOLIB to control it. This GPIO is 8 bit. I am trying to build driver and check functionality using 8 leds connected to this GPIO.

 

I can use gpiod_set_array_value almost successfully except for one issue:

Sending ascii character B (which is: 0100_0010), triggers the right leds(-x--_--x-).

Sending ascii character A (which is: 0100_0001), tirggers the right leds(-x--_---x).

 

After that LSB keeps high (its led is always on)

So sending again ascii character B, triggers wrong leds(-x--_--xx).

 

This happens with any odd number (LSB is '1'), I can't set it to 0 again.

 

When I try to control this LSB pin individually using gpiod_set_value. it is working fine (I can switch it on/off), so I don't think there is a problem in the Hardware.

 

Can anyone please advise, whout could be the problem

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Explorer
Explorer
636 Views
Registered: ‎02-08-2017

Re: Setting LSB using gpiod_set_array_value

Jump to solution

I found one workaround for this problem. May be it is useful for someone:

I had to close the created gpiod descriptor then re-assign it again before setting any value to my gpio. Please see below figure to understand my kernel module configuration

gpiod_workaround.png

I have no clue actually why it is only working like this.

View solution in original post

0 Kudos
1 Reply
Highlighted
Explorer
Explorer
637 Views
Registered: ‎02-08-2017

Re: Setting LSB using gpiod_set_array_value

Jump to solution

I found one workaround for this problem. May be it is useful for someone:

I had to close the created gpiod descriptor then re-assign it again before setting any value to my gpio. Please see below figure to understand my kernel module configuration

gpiod_workaround.png

I have no clue actually why it is only working like this.

View solution in original post

0 Kudos