code double faults when in a while(1); loop

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
Gman
Member
Member
Posts: 37
Joined: Tue Jun 23, 2009 10:12 pm

code double faults when in a while(1); loop

Post by Gman »

I recently got my IDT working, and when I call an interrupt it returns fine. But sometime in the middle of my while(1); loop a int 8 is called, which leads to many int 13. Does anyone know why this is happening? All the computer is doing is jumping back to itself.
"For those about to rock, we salute you"
-Brian Johnson
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: code double faults when in a while(1); loop

Post by gerryg400 »

Make sure interrupts are disabled.
If a trainstation is where trains stop, what is a workstation ?
User avatar
NickJohnson
Member
Member
Posts: 1249
Joined: Tue Mar 24, 2009 8:11 pm
Location: Sunnyvale, California

Re: code double faults when in a while(1); loop

Post by NickJohnson »

Have you remapped the PIC to not overlap with processor faults? Is there a valid interrupt handler set up for int 8?
User avatar
Gman
Member
Member
Posts: 37
Joined: Tue Jun 23, 2009 10:12 pm

Re: code double faults when in a while(1); loop

Post by Gman »

That seems like it is just avoiding the problem.
"For those about to rock, we salute you"
-Brian Johnson
Gigasoft
Member
Member
Posts: 856
Joined: Sat Nov 21, 2009 5:11 pm

Re: code double faults when in a while(1); loop

Post by Gigasoft »

Have you sent a new ICW2 to the PIC? If not, IRQ 0 (which 8254 timer channel 0 is connected to) corresponds to interrupt vector 8, making it indistinguishable from a double fault.
Post Reply