FAQ Database Discussion Community


Why doesn't this function propperly toggle an LED on and off?

c,interrupt,gpio,atmel,atsam3x
I am using the Atmel SAM3x8E micro-controller and trying to do a simple LED toggle when I press a button. I am using pull-up configuration button to trigger an interrupt routine. This is the initialization for the interrupt: // Set button pins as pull-up inputs pio_set_input(PIOC, BUTTON_1, PIO_PULLUP); pio_set_input(PIOC, BUTTON_2,...

How to mask keyboard interrupt using IMR in 8086?

keyboard,interrupt,mask,8086
I would like to disable keyboard interrupts, by masking it in the IMR. I'm not really sure how to access it, and change it? As I realize, it's on the IRQ1 line, so the bit 1 should be 0....

Where the program counter goes after returning the interrupt handler?

assembly,interrupt,program-counter
Hi I am wondering where the program counter goes when the program returns from interrupt service routine? I know when the interrupt event occurs the PC is pushed into the stack. But what address is pushed into the stack the next one or the same one(just executed one)?When we have...

Thread doesn't seem to exit cleanly - thread hang

java,multithreading,interrupt
So I was trying to do some testing based off some things I know about the Java Memory Model (JMM) because I wanted to see how they applied to a initialization+assignment in a try-catch block with an exception thrown, and I obtained the results I wanted (not related, but I...

how to observe interrupts in windows or linux ubuntu 14.04

interrupt,interrupt-handling,interruptions
everybody i want to observe interrupt handling in my system, now i'm using windows 8.1, i can use a linux ubuntu 14.04.1 on Vmware virtual machine too. any information about interrupt handling , counting them and watching their processing is useful. is there any application that do this monitoring? please...

BIOS interrupt _int86

c,interrupt,bios
I'm trying out some old code frome the book "Black art of 3d game programming". I know it is outdated but I started reading it and it's kind of fun and interesting. I downloaded the OpenWatcom C Compiler and made a new DOS Project in order to get this old...

What is this concept of Pending Interrupts

x86,interrupt,interrupt-handling,microprocessors,isr
I am unable to fathom the term Pending Interrupts. I mean, the way I see asynchronous events is like "Time, tide and Interrupts" wait for none. Then what is this pending interrupts. How can I service a request that has come in the past, which has gone. Can someone please...

NetBSD kernel crash due to cache error - What is good point to start debugging?

caching,kernel,mips,interrupt,netbsd
Below is the stack trace of NetBSD 5.1 kernel crash. Basic data collected from minicore is : ------------------------------------------------------------- VALID MAGIC: 0xdfeedfee --------------------------PANIC STRING----------------------- panic string is :cache error @ EPC 0xffffffff80359a78 L1D_CACHE_ERROR_LOG 0 L1D_CACHE_INTERRUPT 0 status 0x8305, cause 0x78 Stack Trace : sys/arch/evbmips/navasota/md_dump.c:52: 803e092c : sys/arch/evbmips/rmixl/machdep.c:1247: 8032c468 : sys/kern/subr_prf.c:313: 802934ec...

Why page fault is considered as trap

interrupt,trap
Why page fault is considered as trap instead of interrupt? And what exactly is the stages take place when you try access null pointer until you get segmentation fault? and the signal which is sent in this situations I SIGILL, right? Thanks!

Control Flags in Interrupt Routine and NMI [8086]

interrupt,masm,flags,8086
I know how an interrupt routine is executed in 8086. The thing that isn't clear to me is how different types of interrupts (i.e hardware, software and exception) uses the control flags (Interrupt Flag and Trap Flag) in their execution. And other thing is what is Non-mask-able Interrupts and its...

java do interruptions act volatile?

java,multithreading,concurrency,interrupt,volatile
If one thread interrupts another, will the interrupted status be immediately visible (i.e can it have visibility problems)? On top of that I am wondering do you ever use interruptions? A Volatile boolean flag seems way more reliable...

LPC17XX SPI: Implementing pulse-sensitive(edge-triggered) interrupts

c,arm,interrupt,spi,lpc
I would like to implement a pulse-sensitive, aka edge-triggered, interrupt on an LPC1759 microcontroller. In the UM10360.pdf datasheet and ARM Cortex-M3 user guide, it says that interrupts can be triggered based on level- or pulse-sensitive behavior, but I am unable to find how to set this to be pulse-sensitive. Can...

How does Linux remember its Kernel Stack Pointer?

linux,linux-kernel,stack,kernel,interrupt
I know that there are two types of stack in Linux : user stack for each user threads and Kernel Stack for kernel threads (but 1 process). The interruptions, more precisely, the interruption procedures, are the bridges between this two modes, kernel (0) and user (3). The interrupt vector table...

glitches when using time overflow interrupt

c,timer,interrupt,avr,attiny
I have some trouble with, I guess, the overflow interrupt (used to increase resolution on 8-bit timer from 16µs/step to 1µs/step) in my CODE. It seems like the overflow interrupt triggers while the program is in the if-statements in my main loop and thereby screws thigns up! if(pInt == 1)...

How many interrupts does my cpu have per second?

linux,cpu,interrupt
I have a 2.6 GHz Intel Core i7 running Linux. I am wondering how many interrupts on average my CPU gets per second. Does anyone have a suggestion?...

Assembler plump/water animation

assembly,nasm,interrupt,ms-dos
I am new in assembler and I am looking for easy solution how to insert a loop in my code. Can you guys give me a tip or answer? I found some articles on google and I cannot understand them cuz I am dumb, though. I've to do a projeckt:...

Interrupt programming for AVR ATmega48

c,microcontroller,interrupt,avr,atmega
I have a small task to program the following using C, for an ATmega48 controller: In the beginning, all (6) LEDs are turned on. When button SW1 is pressed, LEDs are only allowed to be turned off with the respective buttons. When button SW2 is pressed, LEDs are only allowed...

Type 'interrupt' attribute only applies to functions [-Wattributes] when using typedef function pointer

pointers,gcc,attributes,warnings,interrupt
I have the following line of code: typedef void(* foo)(void) __attribute__ ((interrupt)); When using LPCXpresso to compile the project I get a compiler warning: Type 'interrupt' attribute only applies to functions [-Wattributes] Could anyone give me a hint on how to fix this warning? ...

Thread Interrupts. Can someone explain me the output to understand interrupts better? [closed]

java,multithreading,interrupt,interrupted-exception
I am able to understand Threads and interrupts. I was trying to map the underlying concepts learnt from Oracle tutorial to understand concept of interrupts better. I developed this example and tried hard to understand the output as how interrupts are playing a role here. I just did not understand....

Simple bootloader fails reading sectors with int 13h on a real machine

assembly,interrupt,bootloader,bios,pendrive
I have a strange problem with my simple bootloader code. It is supposed to read a sector from disk through BIOS interrupt 13h function 02h into the video memory of the text mode (just to see if it works). It works perfectly fine on emulators (Bochs, QEmu), but when I...

Do non-maskable interrupts have priority over the current instruction?

assembly,x86,interrupt
I'm working on an Assembly course and the following question has puzzled me. I've tried to replicate it in code, but it's hard to reproduce the situation in a simulator. A value of 5 is stored at 0x0000100. At the exact same moment when the processor is evaluating a INCB...

Software interrupts on AVR

posix,interrupt,system-calls,avr,syscall
I understand that x86 machine code can make POSIX system calls using software interrupts (by entering a 32-bit value corresponding to a kernel function into the EAX register of the processor and then executing INT 0x80). I'm looking into designing a small Unix-like operating system for the AVR architecture for...

How to force interrupt to restart main loop instead of resuming? (timing issue!)

loops,arduino,interrupt,isr
For the last two days i wrote a program that in basic terms generates a fairly accurate user adjustable pulse signal (both frequency and duty cycle adjustable). It basically uses the micros() function to keep track of time in order to pull low or high the 4 digital output channels....

How can we generate Keyboard interrupts using python

python,linux,interrupt,keyboardinterrupt
Is there a way to generate Keyboard interrupt without actually pressing a key on keyboard using a python program in linux. The interrupt should look like if someone has pressed a key on the keyboard and the complete system should get that interrupt irrespective of the currently focused window. For...

Python “shutdown / reboot raspberry pi” script, using a single button

python,linux,raspberry-pi,interrupt
I got a piece of code in Python from here: http://www.raspberry-pi-geek.com/Archive/2013/01/Adding-an-On-Off-switch-to-your-Raspberry-Pi And I wanted to improve on it. Since this is the first time I work with Python, I got stuck on understanding what actually happens. Here is the code: # Import the modules to send commands to the system...

ARM interrupts from the beginning (Cortex-M4)

c,arm,interrupt,cortex-m,nxp-microcontroller
I am dealing with a new microcontroller LPC4088 from NXP. I needed 2 weeks to study and write a working examples for peripherals: IOCONFIG, GPIO, TIMERS, PWM and ADC. Please take a look at my repositories here. This is how you will get a feeling for how I work and...

InterruptedException not catch?

java,interrupt,future
I'm trying to implement the Raft Consensus Algorithm for a Distributed System Project, in particular now I'm concentrating about Leader Election Algorithm. Essentially, there are 3 states: Follower Candidate Leader The state passage is pretty complicate if you don't know the algorithm, and I think that the only useful things...

What's the shortcut to interrupt the kernel in Canopy?

osx,kernel,interrupt,shortcut,canopy
I'm on OSX, using canopy. Does anybody know what the shortcut for interrupting the kernel is? Thanks.

Two ISR with the same timer AVR

timer,interrupt,avr
I'd like to know if it's possible to use 2 different ISR (e.g. ICP input capture and timer overflow) in AVR microcontrollers

HtmlUnit WebClient resets thread interruption status

java,multithreading,interrupt,htmlunit,executorservice
I have a bunch of parser classes that subclass a PriseParser class and implement a getAllPrices() method (called by the PriseParser.getPrices() that does some other stuff too not related to this post) in order to acquire some data from various web sites. Below is an example for such an implementation:...