• 0

Question

Hi,

I'm stuck in SDK. I want to control my hardware design through the use of IP cores, but can't seem to get my software to run properly. I cant even xil_printf nor light some LEDs on my Zybo z20. Any suggestions?

gpio.PNG.e9c0f873a4a22fbbde401ae5a5114454.PNG.6e2f74b05e7386a65c97fdd91954a05c.PNGhardware.PNG.3eac1753731d23a0f2ed765285a2ea54.PNG.e394de60b33bc6caaa4131873afe4cb7.PNG

 

head.h helloworld.c

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Hi Kris,

Based on info you provided it could be many different things. For example, why are you using uart_rtl instead of UART1 or UART0? This could be a configurattion issue. Using interrupts for buttons is another tricky part which requires proper configuration not described in your post.

I would start with known path and upgrade gradually. In the past I tested the original Zybo with a trivial button-LED project and attached three files related to it. Try it if you want. The project requires Zybo board file and AXI configuration. SDK UART console is used for xil_printf.

Goo luck!

 

BTN_LED_DB.jpg

BTN_LED_c.txt Filter_vhd.txt

Share this post


Link to post
Share on other sites
  • 0
Posted (edited)

Hi @Notarobot ,

 

Thanks for your reply. This is a 'known path' to me. I've used this template during schoolprojects on a zybo z7-10. Configuration of interrupts on hardware level is done by activating fabric interrupts. On software level I use ScuGicInterrupt_Init to correctly map them to a certain IR routine function.

3 hours ago, Notarobot said:

For example, why are you using uart_rtl instead of UART1 or UART0

I'm not sure what you are trying to point out with this.

ir1.PNG

ir2.PNG

ir3.PNG

Edited by Kris Persyn

Share this post


Link to post
Share on other sites
  • 0

Hi, Kris,

I noticed uart_rtl line on your diagram and assumed that it was for xil_printf. It is easier to use standard UART connected to MIO which doesn't need PL blocks.

I recommend to search Avnet.com or Zedboard.org for Introduction to Zynq Lab 6 called "Adding Interrupts from the Custom PL Peripheral".  Also try to set Integrated Logic Analyzer (ILA). It is extremely useful to debigging.

 

Share this post


Link to post
Share on other sites
  • 0
Posted (edited)

Hi @Notarobot,

Oh that's a standard uart AXI IP core (Uartlite) I wan't to use for my project. I connected the TX and RX to the PMOD outputs. It has nothing to do with xil_printf right?

Edited by Kris Persyn

Share this post


Link to post
Share on other sites
  • 0

Kris,

Printing via xil_print is using STDIO by default and could reconfigured in Vivado and SDK. With little info you provided a lot left for guessing.

My last recommendation is to pay attention to a configuration of your build in SDK. The interrupt interrupt service routine (ISR) might not work if GCC compiler has optimization ON. To make it work the variable in the ISR should be declared volatile. Debug build usually has flag -O0 that optimization none.

Good luck!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now