##// END OF EJS Templates
rev 3.0.0.0
paul -
r198:c53fb904ef31 R3
parent child
Show More
@@ -30,11 +30,13 void force_irq (int irq) { lreg[IFORCE/4
30 30 /* NOTE: NEVER put printf() or other stdio routines in interrupt handlers,
31 31 they are not re-entrant. This (bad) example is just a demo */
32 32
33 unsigned char processTimecode = 0;
33 volatile unsigned char processTimecode = 0;
34 unsigned int counter = 0;
34 35
35 36 void irqhandler(int irq)
36 37 {
37 38 processTimecode = 1;
39 counter ++;
38 40 }
39 41
40 42 int main( void )
@@ -43,7 +45,6 int main( void )
43 45 unsigned int k;
44 46 volatile unsigned int *reg;
45 47 float aux;
46 unsigned int counter = 0;
47 48
48 49 printf("hello world!\n");
49 50
@@ -60,20 +61,10 int main( void )
60 61
61 62 while(1)
62 63 {
63 if (processTimecode == 1)
64 {
65 counter ++;
66 printf("timecode counter = %d\n", counter);
67 processTimecode = 0;
68 }
69 else
70 {
71 printf(".");
72 }
73
74 // for (k=0; k<100000;k++)
64 // if (processTimecode == 1)
75 65 // {
76 // aux = aux + *reg ;
66 // printf("timecode counter = %d\n", counter);
67 // processTimecode = 0;
77 68 // }
78 69 }
79 70
@@ -1,15 +1,11
1 1 # LOAD FSW USING LINK 1
2 2 SpwPlugin0.StarDundeeSelectLinkNumber( 1 )
3 3
4 APB_UART_PLUGIN0.setFifoDebugEnabled( 0 )
5
6 4 dsu3plugin0.openFile("/opt/DEV_PLE/EQM/bin/eqm")
7 5 dsu3plugin0.loadFile()
8 6
9 7 dsu3plugin0.run()
10 8
11 APB_UART_PLUGIN0.setFifoDebugEnabled( 1 )
12
13 9 # START SENDING TIMECODES AT 1 Hz
14 10 SpwPlugin0.StarDundeeStartTimecodes( 1 )
15 11
@@ -6,9 +6,6 SpwPlugin0.selectBridge("STAR-Dundee Spw
6 6 proxy.loadSysDriverToParent("dsu3plugin","SpwPlugin0")
7 7 proxy.loadSysDriverToParent("LFRControlPlugin","SpwPlugin0")
8 8
9 proxy.loadSysDriverToParent("APB_UART_PLUGIN","SpwPlugin0")
10 APB_UART_PLUGIN0.setFifoDebugEnabled( 1 )
11
12 9 availableBrickCount = SpwPlugin0.StarDundeeGetAvailableBrickCount()
13 10 print str(availableBrickCount) + " SpaceWire brick(s) found"
14 11
General Comments 0
You need to be logged in to leave comments. Login now