aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-03-18 15:14:38 -0700
committerChristian Cunningham <cc@localhost>2022-03-18 15:14:38 -0700
commit8b4a126ccca0694161bc3d0731f8b5c1ec66e5c8 (patch)
tree021e33527230dc2c11158efc298072058326acd4 /src
parente5e023ef7ba4b4ae3dcd04ef632d26fae3a43cae (diff)
Snappier Refresh
Diffstat (limited to 'src')
-rw-r--r--src/cpu/irq.c11
-rw-r--r--src/exceptions/irq.S2
2 files changed, 4 insertions, 9 deletions
diff --git a/src/cpu/irq.c b/src/cpu/irq.c
index b2d9a71..4708293 100644
--- a/src/cpu/irq.c
+++ b/src/cpu/irq.c
@@ -56,16 +56,11 @@ void c_irq_handler(void)
}
}
// Check if System Time Compare 0 Triggered the Interrupt
- else if (*(volatile unsigned long*)SYS_TIMER_CS & SYS_TIMER_SC_M0) {
+ if (*(volatile unsigned long*)SYS_TIMER_CS & SYS_TIMER_SC_M0) {
volatile unsigned long* timer_cs = (volatile unsigned long*)SYS_TIMER_CS;
volatile unsigned long* timer_chi = (volatile unsigned long*)SYS_TIMER_CHI;
volatile unsigned long* nexttime = (volatile unsigned long*)SYS_TIMER_C0;
- static char timer_lock = 0;
- if (!timer_lock) {
- timer_lock = 1;
- add_thread_without_duplicate(test_entry, 0, 2);
- timer_lock = 0;
- }
+ add_thread_without_duplicate(test_entry, 0, 2);
*nexttime = *timer_chi + 8000000;
*timer_cs = SYS_TIMER_SC_M0;
}
@@ -88,7 +83,7 @@ unsigned long c_fiq_handler(void)
counter++;
if (counter % 0x6000 == 0)
counter = 0;
- if (counter % 0x10 == 0)
+ if (counter % 0x08 == 0)
status();
if (counter % 0x40 == 0)
return 1;
diff --git a/src/exceptions/irq.S b/src/exceptions/irq.S
index db8b4cd..2c1a6e8 100644
--- a/src/exceptions/irq.S
+++ b/src/exceptions/irq.S
@@ -1,7 +1,7 @@
.section ".text.exceptions"
.globl irq
irq:
- cpsid aif
+ cpsid ai
push {r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,lr}
// Run IRQ handler
bl c_irq_handler