<Momber>
I'm currently trying to build litex with working interrupts for the buttons on the arty a7 with vexriscv cpu.
<Momber>
When i'm adding the following code to my BaseSoc class
<Momber>
self.buttons = GPIOIn(
<Momber>
pads = platform.request_all("user_btn"),
<Momber>
with_irq = self.irq.enabled
<Momber>
)
<Momber>
the csr regions get correctly created, but the interrupt lines are not created.
<Momber>
In my understanding, the with_irq param should autocreate the interrupts. Am I missing something obvious?
<Momber>
My guess is, that the add_irq() function in the _GPIOIRQ class in gpio.py is doing something different than what I expect it to do, or doesn't get called at all.
<Momber>
But any help pointing me in the right direction is appreciated. Thank you
<geertu>
Momber: Does reading the button state (without interrupts) work?
<Momber>
Yes, I can use the buttons_in_read function in the generated csr.h file.
<Momber>
What I was expecting for the interrupts, was that in the generated soc.h file I will have a interrupt define for the the buttons aswell. Currently I tried it with the standard generation script, which gives me interrupts for a timer and the uart. With the added button, the list does not get extended for the 4 buttons I would expect something like
<Momber>
CONFIG_CPU_INTERRUPTS 4
<Momber>
And with a button defined in renode and mapped to the expected address, i get correct values for the buttons_in_read() function based on the button state
<Momber>
sry* CONFIG_CPU_INTERRUPTS 6 was what i meant. 1 timer + 1 uart + 4 buttons