cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
asai9493
Adventurer
Adventurer
366 Views
Registered: ‎12-10-2020

interrupt request number

Hello everyone!

I am studying the interrupt in ZYNQ. In forum, an interrupt request number is mentioned oft. I didn’t find information about it in the technical manual.

What is the interrupt request number? Does it use for an initialization interrupt? How to determine it? Where is it given?

 

 

Tags (3)
0 Kudos
5 Replies
derekm_
Voyager
Voyager
354 Views
Registered: ‎01-16-2019

Zynq TRM Chapter 7.

For more in-depth information, read v1.0 of the GIC spec from ARM:

https://developer.arm.com/documentation/ihi0048/a/Introduction

 

0 Kudos
asai9493
Adventurer
Adventurer
339 Views
Registered: ‎12-10-2020

Can I have an interrupt inside the other interrupt?

For example,  using a push button on a board as interrupt. If the button is pushed, leds start blinking. If I push the second time, the Led stop blinking

0 Kudos
derekm_
Voyager
Voyager
301 Views
Registered: ‎01-16-2019

[EDIT: Removed static variable advice.]

It's hard to interpret what your system looks like, so here's a really basic way to do what you want (or at least what I think you want):

You just need one interrupt handler for what you're doing. Every time it is called, it can toggle a global variable called (for example) "g_blink_status".

Put your LED code in your main() loop. If the main loop sees that g_blink_status is "1", it should toggle the LED(s). If it sees that g_blink_status is "0", it should keep the LED(s) off.

Basically what you have here is a foreground-background architecture. The main loop runs continually in the background. The interrupt handler runs intermittently in the foreground. See Lesson 21 in this video series for an introduction to the foreground-background architecture.

_____________________________

HOWEVER!

Eventually you will come across a serious flaw in what you are trying to do: the button press is not being debounced. To do that you shouldn't be using the button press as an interrupt trigger. Instead, you need to use a timed interrupt solution to debounce the button press. See http://www.ganssle.com/debouncing-pt2.htm

I think you are trying to learn, so perhaps you should keep on with your current design to see the problem in switch/button bouncing. Then try to fix it using the timed interrupt. I could write the code for you, but it would be a waste of time for both of us.

0 Kudos
fincs
Adventurer
Adventurer
205 Views
Registered: ‎03-21-2016

More information needed. Are interrupts used in the processor unit or in the programmable logic?

0 Kudos
derekm_
Voyager
Voyager
198 Views
Registered: ‎01-16-2019

Primarily in the Generic Interrupt Controller (GIC), which is in the Arm Cortex-A9 MPCore. The GIC takes interrupt events from all over the system and forwards the interrupt requests to one or both cores in the MPCore unit, where the interrupt is handled. However, interrupts from peripherals in the Processing System can also be routed to the programmable logic (so technically interrupts can be used in two locations, which is what you asked).

See Chapter 7 of the Zynq-7000 TRM (UG585).

Also, the GIC, spec v1.0.

0 Kudos