Entry: Zynq design from scratch. Part 47. Sunday, May 18, 2014

LED_Pushbuttons application program


Starting Xilinx SDK


--> xsdk &

Re-generate BSP sources

After we have modified our hardware design and added the interrupt logic we need to re-generate the Board Support Package to incorporate support for interrupts. Open the system.mss file, if not already opened and click Re-generate BSP Sources.





Create a new application program


We will keep the LED_Dimmer application as is and create a new application called LED_Pushbuttons.





Writing the program


We will use the LED_Dimmer c-program as a starting point and add support for push buttons and add an Interrupt Service Routine (ISR).

Not reinventing the wheel

Let's find some good examples that can help us implement the interrupt handling in our application. Open system.mss and click on examples for the axi_gpio_0 peripheral.





We will take a closer look at the xgpio_intr_example.c file.






My implementation


This is what I came up with. Take a look. Let's compile and run the program.  See part 19 for more information.





Here is the result.




Top   Previous   Next


   3 comments

Name
June 4, 2014   02:07 PM PDT
 
Test
Simone
June 4, 2014   02:07 PM PDT
 
Hi,
I'm trying to make a custom IPcore with Vivado and I would like to ask you how can be possible to add an interrupt signal to the IPcore. The interrupt signal is just a std_logic_vector or should I specify somewhere that that port is an interrupt?
Then how can identify the interrupt sender from the C code?
Thanks
Mohamed
May 24, 2014   08:19 PM PDT
 
good work ;)

Leave a Comment:

Name


Homepage (optional)


Comments