I need a configurable timer for VoCore IoT device, e.g. with 10 ms to debounce buttons or with 100 ms to blink an LED. According to MT7628 datasheet, there are 2 hardware timer available: timer0 and timer1. I did some testings with timer0 and I was able to configure and start it (by using registers T0CTL_REG, T0LMT_REG and T0_REG).
Questions:
1. Why are IRQ INTC-24 (timer0) and INTC-25 (timer1) not showing up in /proc/interrupts?
2. How can I use the interrupts from my application, which is written in ANSI C and running in user space?
About question 2: I guess I have to write a kernel module, right? If so, does anybody know or have some examples or tutorials, how to write and compile those modules for VoCore / OpenWrt? This because I have no experience with kernel modules and I guess at some point I won't be able to avoid them anymore in my VoCore project.
Many thanks and regards,
Markus
- Code: Select all
> cat /proc/interrupts
CPU0
5: 6212 MIPS 5 10100000.ethernet
6: 406049 MIPS 6 ra0
7: 1730803 MIPS 7 timer
15: 0 INTC 7 10002800.gdma
25: 1 INTC 17 esw
26: 1 INTC 18 ehci_hcd:usb1, ohci_hcd:usb2
30: 1049 INTC 22 serial
ERR: 0