Jump to content
  • 0

Accessing PS MIO (LED and 2 push buttons)?


dand400

Question

Using a Zybo board, PB200-279 Rev. B, with Vivado and Xilinx SDK 2015.2 (64-bit).

When running the PS software in SDK and a call is made to access the PS MIO LED or pushbuttons via the XGpioPS_... (CfgInitialize, SetDirection, ReadPin, WritePin, etc.) functions, the software hangs at that call and never returns.

Has anyone seen this problem or know what the cause of the problem is and what the solution would be?

Thanks!

Link to comment
Share on other sites

15 answers to this question

Recommended Posts

I spoke too soon, and made a mistake above (swapped names).

Above should have said "... variables as XGpio instead of XGpioPs".

But after doing new fabric/bitsream project and new SDK project (but with same code from the examples) with the PS MIO for the two pushbuttons (BTN4 and BTN5, MIO50 and MIO51) and the LED (LD4 MIO7), the LED works but the two pushbuttons always return 1.

The pushbuttons and LED are enabled in the PS in the block design in Vivado.

Any thoughts on why the two pushbuttons always return 1 (buttons pressed)?

PS: I cannot attach anything from the design b/c it is on a standalone system (no way to get files off of system).

Thanks,

dand400

Link to comment
Share on other sites

Renamed the .sdk folder, regenerated the bitstream, exported hardware to SDK, launched SDK, created new SDK project, imported previous SDK source files into new SDK project, and everything worked!

Evidently when changing the PS configuration in Vivado (then creating HDL wrapper, generating bitstream, and exporting hardware to SDK) something is not making it to the hardware or BSP in SDK and then things no longer work corretly.  Is there a step I am omitting (when making changes to PS and/or fabric in Vivado) that corrupts or prohibits all changes being exported to SDK correctly?

Thanks,

dand400

 

Link to comment
Share on other sites

jpeyron,

Problem is not with SDK code, but in export of hardware to SDK from Vivado (see above post) and/or possible attempt to use UART0 on JF9 and JF10 (MIO14 and MIO15).

Also, cannot get files from system where performing this work, quite impossible.

Thanks,

dand400

Link to comment
Share on other sites

12 hours ago, jpeyron said:

Hi @dand400,

I did not see you mention how you are launching SDK. Are you launching SDK from Vivado(which is what i typically do) or are you exporting the hardware including bitstream and then opening SDK separately and opening up the project from there?

cheers,

Jon

Jon,

I always launch SDK from Vivado (to ensure proper files are loaded).

Thanks,
Dan

 

Link to comment
Share on other sites

Hi @dand400,

I am glad you were able to get your project to work correctly. To confirm you issue: SDK is not working correctly when you update an existing project's hardware from Vivado.To get it to work you had to make delete the sdk fold in you project re-export hardware and put software files from previous project back in and it then worked. Let me know if i am not understanding the issue or have missed something. I have been looking through the Xilinx forums and haven't found a thread that matches up to your issue and resolves the issue. If this issue persists you might want to reach out on the Xilinx forum whereas they would have more understanding of why this is happening and what to do to solve it.

cheers,

Jon

Link to comment
Share on other sites

19 hours ago, jpeyron said:

Hi @dand400,

I am glad you were able to get your project to work correctly. To confirm you issue: SDK is not working correctly when you update an existing project's hardware from Vivado.To get it to work you had to make delete the sdk fold in you project re-export hardware and put software files from previous project back in and it then worked. Let me know if i am not understanding the issue or have missed something. I have been looking through the Xilinx forums and haven't found a thread that matches up to your issue and resolves the issue. If this issue persists you might want to reach out on the Xilinx forum whereas they would have more understanding of why this is happening and what to do to solve it.

cheers,

Jon

Jon,

I might have narrowed the problem down (or maybe muddled it up). It now appears that one or more of the MIO/PS pushbuttons, LEDs, and/or UART1 (stdin/stdout) stop working when a second serial port is attached via the Zybo PMOD connectors. At first I had attempted to use MIO/PS UART0 routed via some PMOD pins. Next I have attempted to use the fabric IP UartLite routed via PMOD pins. I have tried two different logic to RS232 converters and both cause the same problem. Currently neither serial port works when the second serial port, UartLite, is physically connected to the logic to RS232 converter connected to the PC communications port.

Dan

Link to comment
Share on other sites

On 3/17/2017 at 9:48 AM, dand400 said:

Jon,

I might have narrowed the problem down (or maybe muddled it up). It now appears that one or more of the MIO/PS pushbuttons, LEDs, and/or UART1 (stdin/stdout) stop working when a second serial port is attached via the Zybo PMOD connectors. At first I had attempted to use MIO/PS UART0 routed via some PMOD pins. Next I have attempted to use the fabric IP UartLite routed via PMOD pins. I have tried two different logic to RS232 converters and both cause the same problem. Currently neither serial port works when the second serial port, UartLite, is physically connected to the logic to RS232 converter connected to the PC communications port.

Dan

To further explain:

When I enable PS UART1 and add fabric IP UartLite but do not physically connect anything to the PMOD pins (JE-9 and JE-10) where the UartLIte is routed, the stdin/stdout (UART1) functions correctly. But when I physically connect the Digilent "Pmod RS232: Serial Converter and Interface Standard" to Pmod JE, the stdin/stdout stops working to the point that some combination of power cycle to the Zybo and restarting the serial communication application must be done to restore stdin/stdout functionality.

Dan

Link to comment
Share on other sites

On 3/21/2017 at 8:03 AM, dand400 said:

To further explain:

When I enable PS UART1 and add fabric IP UartLite but do not physically connect anything to the PMOD pins (JE-9 and JE-10) where the UartLIte is routed, the stdin/stdout (UART1) functions correctly. But when I physically connect the Digilent "Pmod RS232: Serial Converter and Interface Standard" to Pmod JE, the stdin/stdout stops working to the point that some combination of power cycle to the Zybo and restarting the serial communication application must be done to restore stdin/stdout functionality.

Dan

Switched from Pmod JE to Pmod JB for the TX & RX of UartLite and everything worked.

Does UartLite not work on JE (Std) on Zybo?

 

Link to comment
Share on other sites

Specifically, if you find that LED4 for MIO7 works..but you can't get BTN5 and BTN4 to work, try the following...

The answer to this is the Zynq7000 pullups for MIO50 and MIO51 are enabled by default, this is likely due to the standard BSP.

Given you've kept the GPIO MIO enabled do the following:

In Vivado go to the zynq7000 processor instance on the canvas, double click on it.

Go to MIO configuration --> I/O Peripherals --> GPIO MIO  then scroll down to MIO50 and MIO51  (Do NOT change the voltage level of the bank for these GPIO, they should be 1.8v)

The schematic in the manual shows these are connected to 3.3V, however they are connected to 1.8V in the schematic. (You can probe it, you will find no connection with BTN4 and BTN5 with 3.3V)

Change the Pullup field to "Disabled"  ... Click ok... validate the design, update the wrapper, build the bitstream, and export to SDK. In SDK clean the build.

find the correct Device ID In xparameters.h and configure the driver structure... set pin directions... (You can find an example on how to do this in system.mss, import the example for ps7_gpio_0.) 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...