[meta-xilinx] no led on zedboard
Edward Vidal
vidal.develone at gmail.com
Sun Nov 29 17:50:13 PST 2015
Hello All
I added devmem2 to my zedboard.
devmem2
Usage: devmem2 { address } [ type [ data ] ]
address : memory address to act upon
type : access operation type : [b]yte, [h]alfword, [w]ord
data : data to be written
devmem2 0xE000A000 w
/dev/mem opened.
Memory mapped at address 0xb6fc3000.
Read at address 0xE000A000 (0xb6fc3000): 0x0000FE32
How many memory locations are used for each GPIO?
In xps I see the gpio memory is 0xE000A000 0xE000AFFF 4K
My switches work sw_export
#!/bin/sh
echo "Starting rcS..."
#echo "++ Starting OLED Display"
#load_oled
echo "++ Exporting LEDs & SWs"
for i in 0 1 2 3 4 5 6 7;
do
sw=$(($i+65));
echo $sw > /sys/class/gpio/export;
done;
with read_sw
#!/bin/sh
value=0;
for i in 0 1 2 3 4 5 6 7;
do
sw=$((72-$i));
sw_tmp=`cat /sys/class/gpio/gpio$sw/value`;
value=$(($value*2));
value=$(($value+$sw_tmp));
done;
printf "0x%x %d\n" $value $value;
sw_export an s
In the system.ucf
I read online that the gpip pin is offset by 54 which makes sense for the
switches based on what works with the
2 routines above.
NET processing_system7_0_GPIO_pin[11] LOC = F22 |
IOSTANDARD="LVCMOS25"; # "SW0" 65
NET processing_system7_0_GPIO_pin[12] LOC = G22 |
IOSTANDARD="LVCMOS25"; # "SW1" 66
NET processing_system7_0_GPIO_pin[13] LOC = H22 |
IOSTANDARD="LVCMOS25"; # "SW2" 67
NET processing_system7_0_GPIO_pin[14] LOC = F21 |
IOSTANDARD="LVCMOS25"; # "SW3" 68
NET processing_system7_0_GPIO_pin[15] LOC = H19 |
IOSTANDARD="LVCMOS25"; # "SW4" 69
NET processing_system7_0_GPIO_pin[16] LOC = H18 |
IOSTANDARD="LVCMOS25"; # "SW5" 70
NET processing_system7_0_GPIO_pin[17] LOC = H17 |
IOSTANDARD="LVCMOS25"; # "SW6" 71
NET processing_system7_0_GPIO_pin[18] LOC = M15 |
IOSTANDARD="LVCMOS25"; # "SW7" 72
NET processing_system7_0_GPIO_pin[19] LOC = T22 |
IOSTANDARD="LVCMOS33"; # "LD0"
NET processing_system7_0_GPIO_pin[20] LOC = T21 |
IOSTANDARD="LVCMOS33"; # "LD1"
NET processing_system7_0_GPIO_pin[21] LOC = U22 |
IOSTANDARD="LVCMOS33"; # "LD2"
NET processing_system7_0_GPIO_pin[22] LOC = U21 |
IOSTANDARD="LVCMOS33"; # "LD3"
NET processing_system7_0_GPIO_pin[23] LOC = V22 |
IOSTANDARD="LVCMOS33"; # "LD4"
NET processing_system7_0_GPIO_pin[24] LOC = W22 |
IOSTANDARD="LVCMOS33"; # "LD5"
NET processing_system7_0_GPIO_pin[25] LOC = U19 |
IOSTANDARD="LVCMOS33"; # "LD6"
NET processing_system7_0_GPIO_pin[26] LOC = U14 |
IOSTANDARD="LVCMOS33"; # "LD7"
/sys/class/leds# ls
ld0:red ld2:red ld4:red ld6:red ld9
ld1:red ld3:red ld5:red ld7:red mmc0::
ls ld0\:red
brightness device max_brightness power subsystem trigger uevent
This is what in dmesg
dmesg | grep gpio
[ 0.039463] zynq_gpio e000a000.gpio: gpio at 0xe000a000 mapped to
0xe080e000
[ 0.746742] input: gpio_keys.7 as /devices/gpio_keys.7/input/input0
devmem2 0xE080E000 w
/dev/mem opened.
Memory mapped at address 0xb6fe2000.
Bus error
Any and all help is appreciated.
On Sat, Nov 28, 2015 at 7:26 PM, Philip Balister <philip at balister.org>
wrote:
> On 11/28/2015 07:35 PM, Peter Crosthwaite wrote:
> > On Sat, Nov 28, 2015 at 3:01 PM, Edward Vidal <vidal.develone at gmail.com>
> wrote:
> >> Hi Peter,
> >> Thanks for the quick reply. I have been working on Spartan 6 with
> >> StickIt-MB & XulA2-LX9 with RPi2B. I am new on the zedboard and have not
> >> used XSDB or XMD.
> >> Do these require JTAG? I do not have a working one.
> >>
> >
> > Yes they do. But sometimes you can use a program like devmem or
> > peekpoke (not sure if these exist by default in Yocto - Nathan will
> > know more) to directly bang on hardware registers from a Linux shell.
> > Both work using an mmap of /dev/mem which lets userspace do raw IO
> > access (root is required on the target system).
> >
>
> There is a recipe for devmem/devmem2 yo ucan add to your image.
>
> As always, consult the layer index:
>
> http://layers.openembedded.org/layerindex/recipe/1069/
>
> Philip
>
> >> With the Diligent kernel 3.6, I saw the Leds working.
> >>
> >> I am running on a Ubuntu 12.04 with Xilinx 14.6 and Vivado 2013.4 an my
> >> evaluation has expired. I can run xps, ise, vivado.
> >>
> >> Do you think I need to add to analog devices reference design?
> >> git://github.com/analogdevicesinc/fpgahdl_xilinx.git
> >> 3e6cfd4858635e49ea131da1bb4b7b6dd258280b version
> >>
> >
> > Don't know much about the hardware side of things unfortunately.
> >
> > Regards,
> > Peter
> >
> >>
> >> Regards
> >>
> >> On Sat, Nov 28, 2015 at 1:47 PM, Peter Crosthwaite
> >> <crosthwaitepeter at gmail.com> wrote:
> >>>
> >>> On Sat, Nov 28, 2015 at 11:08 AM, Edward Vidal <
> vidal.develone at gmail.com>
> >>> wrote:
> >>>> Hello all,
> >>>>
> >>>> Trying to turn on the leds on my zedboard.
> >>>> I created a module see the
> >>>>
> >>>> filehttps://
> github.com/develone/zedboard_yocto/blob/master/leds/myled_modules_notes.txt
> .
> >>>>
> >>>> I used analog device reference design and meta-topic.
> >>>>
> >>>> I can see load the module and I see items referencing the led in both
> >>>> /proc
> >>>> & /sys
> >>>> see the
> >>>> myled_modules_notes.txt.
> >>>>
> >>>> Any and all help is appreciated.
> >>>>
> >>>
> >>> Hi Edward,
> >>>
> >>> The doc you link looks to only cover the software side of it. The
> >>> other source of error is the hardware of which a number of issues
> >>> could cause your design to not work. Have you attached to the ARM
> >>> processor over XSDB or XMD to turn the LED on and off using register
> >>> accesses (mwr and mrd in XMD)? This can definitively validate that the
> >>> hardware works and the issue is indeed in the software stack.
> >>>
> >>> Regards,
> >>> Peter
> >>>
> >>>> Cheers,
> >>>>
> >>>>
> >>>> --
> >>>> _______________________________________________
> >>>> meta-xilinx mailing list
> >>>> meta-xilinx at yoctoproject.org
> >>>> https://lists.yoctoproject.org/listinfo/meta-xilinx
> >>>>
> >>
> >>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-xilinx/attachments/20151129/861dec8f/attachment.html>
More information about the meta-xilinx
mailing list