commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r6543 - gnuradio/branches/developers/matt/u2f/firmware


From: eb
Subject: [Commit-gnuradio] r6543 - gnuradio/branches/developers/matt/u2f/firmware
Date: Wed, 26 Sep 2007 00:08:50 -0600 (MDT)

Author: eb
Date: 2007-09-26 00:08:49 -0600 (Wed, 26 Sep 2007)
New Revision: 6543

Modified:
   gnuradio/branches/developers/matt/u2f/firmware/pic.c
   gnuradio/branches/developers/matt/u2f/firmware/timer_test.c
Log:
cpu bug work around; reduced debug i/o

Modified: gnuradio/branches/developers/matt/u2f/firmware/pic.c
===================================================================
--- gnuradio/branches/developers/matt/u2f/firmware/pic.c        2007-09-26 
02:35:52 UTC (rev 6542)
+++ gnuradio/branches/developers/matt/u2f/firmware/pic.c        2007-09-26 
06:08:49 UTC (rev 6543)
@@ -67,10 +67,7 @@
 
   pic_regs->mask = ~0;                                // mask all interrupts
   pic_regs->edge_enable = PIC_TIMER_INT | PIC_PHY_INT;
-  int t = ~0 & ~PIC_PHY_INT;
-  sim_puts("pic_init: polarity = ");
-  sim_puthex_nl(t);
-  pic_regs->polarity = t;                             // rising edge
+  pic_regs->polarity = ~0 & ~PIC_PHY_INT;             // rising edge
   pic_regs->pending = ~0;                             // clear all pending ints
 }
 
@@ -83,7 +80,7 @@
 
 void pic_interrupt_handler()
 {
-  sim_puts_nl("PIC_handler:");
+  // sim_puts("PIC_handler: ");
 
   // pending and not masked interrupts
   int live = pic_regs->pending & ~pic_regs->mask;
@@ -94,7 +91,7 @@
   int mask;
   for (i=0, mask=1; i < NVECTORS; i++, mask <<= 1){
     if (mask & live){          // handle this one
-      sim_puthex_nl(i);
+      // sim_puthex_nl(i);
       (*pic_vector[i])(i);
       pic_regs->pending = mask;        // clear pending interrupt
       return;

Modified: gnuradio/branches/developers/matt/u2f/firmware/timer_test.c
===================================================================
--- gnuradio/branches/developers/matt/u2f/firmware/timer_test.c 2007-09-26 
02:35:52 UTC (rev 6542)
+++ gnuradio/branches/developers/matt/u2f/firmware/timer_test.c 2007-09-26 
06:08:49 UTC (rev 6543)
@@ -30,6 +30,8 @@
   sim_puthex_nl(t);
 }
 
+static volatile int not_done = 1;      // FIXME CPU bug workaround
+
 int
 main(void)
 {
@@ -49,8 +51,10 @@
   t = timer_regs->time;
   timer_regs->time = t + DELTA_T;
 
-  while(1){
+  while(not_done){
   }
+  asm volatile ("or r0, r0, r0");      // FIXME CPU bug workaround
+  asm volatile ("or r0, r0, r0");
 
   sim_puts("Done Testing\n");
   





reply via email to

[Prev in Thread] Current Thread [Next in Thread]