SuryaPrakash
-
Posts
4 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Gallery
Posts posted by SuryaPrakash
-
-
Hi all,
I am learning embedded linux with Zybo Z7-20 board, I am using petalinux 2022.1 version to create my customized image,
I tried the prebuilt version linux image offered by digilent , the board boots up with no issues. Since that bsp is made from 2017.4 version of petalinux , I can't use that bsp in my current petalinux version.
So I tried to create project based on zynq template in petalinux and tried to boot it and the booting is not happening.
Can you please suggest any ways on how I can get this boot working, do I need to add device-tree code to the system_user.dtsi file?
-
Hi I am planning to use QNX in Zybo Z7-20 board , where can I find the required BSP packages.
-
Hi,
I bought Digilent Zybo Z7-20 FPGA board , Since it is an EVM , I am hoping that I could get the Hardware description file (.XSA) for the Zybo Z7-20 FPGA board. I thought of using the Hardware description file in Vitis and create a hardware platform and develop my application code on top of that.
Please tell if there is any hardware description file available for Zybo Z7-20 FPGA board , for latest Vitis software version 2022.1.1 or if Hardware description file is available for any other version also , please tell me that.
MIO 50 button read in Zybo z7-20 with Linux is always returning 1
in Embedded Linux
Posted
I am trying to read from MIO 50 button of Zybo Z7-20 in linux , I have changed the voltage from 1.8V to 3.3V in VIVADO and used the .XSA file and generated linux image in petalinux and I have used the following code to read from MIO 50.
Even if I don't press the MIO 50 button , I am still getting result as button pressed.
int fd; //file handler.
struct gpiohandle_request button;
struct gpiohandle_data data;
/*Open the gpiochip0 file which is mapped to the gpio physical layer*/
fd = open("/dev/gpiochip0", O_RDWR); //opening the file in read-write mode.
if(fd < 0)
{
perror("File not present\n");
return -1;
}
/*Set button (MIO-50) as input*/
button.flags = GPIOHANDLE_REQUEST_INPUT;
strcpy(button.consumer_label , "BUTTON");
memset(button.default_values , 0 , sizeof(button.default_values));
button.lines = 1;
button.lineoffsets[0] = PS_SWITCH;
/*Make request to make MIO50 as input*/
if(ioctl(fd , GPIO_GET_LINEHANDLE_IOCTL,&button) < 0)
{
perror("GPIO input request failed\n");
close(fd);
close(led.fd);
return -1;
}
//Intialize the data.values array to 0.
memset(data.values , 0 , sizeof(data.values));
if(ioctl(button.fd , GPIOHANDLE_GET_LINE_VALUES_IOCTL , &data) < 0)
{
perror("Getting value from GPIO input pin failed\n");
close(fd);
close(led.fd);
close(button.fd);
return -1;
}
if(data.values[0] == 1)
{
printf("\nBUTTON PRESS DETECTED\n");
}
else
{
printf("\nBUTTON PRESS NOT DETECTED\n");
}
close(fd);
close(button.fd);
return 0;