##// 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 /* NOTE: NEVER put printf() or other stdio routines in interrupt handlers,
30 /* NOTE: NEVER put printf() or other stdio routines in interrupt handlers,
31 they are not re-entrant. This (bad) example is just a demo */
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 void irqhandler(int irq)
36 void irqhandler(int irq)
36 {
37 {
37 processTimecode = 1;
38 processTimecode = 1;
39 counter ++;
38 }
40 }
39
41
40 int main( void )
42 int main( void )
@@ -43,7 +45,6 int main( void )
43 unsigned int k;
45 unsigned int k;
44 volatile unsigned int *reg;
46 volatile unsigned int *reg;
45 float aux;
47 float aux;
46 unsigned int counter = 0;
47
48
48 printf("hello world!\n");
49 printf("hello world!\n");
49
50
@@ -60,20 +61,10 int main( void )
60
61
61 while(1)
62 while(1)
62 {
63 {
63 if (processTimecode == 1)
64 // 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++)
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 # LOAD FSW USING LINK 1
1 # LOAD FSW USING LINK 1
2 SpwPlugin0.StarDundeeSelectLinkNumber( 1 )
2 SpwPlugin0.StarDundeeSelectLinkNumber( 1 )
3
3
4 APB_UART_PLUGIN0.setFifoDebugEnabled( 0 )
5
6 dsu3plugin0.openFile("/opt/DEV_PLE/EQM/bin/eqm")
4 dsu3plugin0.openFile("/opt/DEV_PLE/EQM/bin/eqm")
7 dsu3plugin0.loadFile()
5 dsu3plugin0.loadFile()
8
6
9 dsu3plugin0.run()
7 dsu3plugin0.run()
10
8
11 APB_UART_PLUGIN0.setFifoDebugEnabled( 1 )
12
13 # START SENDING TIMECODES AT 1 Hz
9 # START SENDING TIMECODES AT 1 Hz
14 SpwPlugin0.StarDundeeStartTimecodes( 1 )
10 SpwPlugin0.StarDundeeStartTimecodes( 1 )
15
11
@@ -6,9 +6,6 SpwPlugin0.selectBridge("STAR-Dundee Spw
6 proxy.loadSysDriverToParent("dsu3plugin","SpwPlugin0")
6 proxy.loadSysDriverToParent("dsu3plugin","SpwPlugin0")
7 proxy.loadSysDriverToParent("LFRControlPlugin","SpwPlugin0")
7 proxy.loadSysDriverToParent("LFRControlPlugin","SpwPlugin0")
8
8
9 proxy.loadSysDriverToParent("APB_UART_PLUGIN","SpwPlugin0")
10 APB_UART_PLUGIN0.setFifoDebugEnabled( 1 )
11
12 availableBrickCount = SpwPlugin0.StarDundeeGetAvailableBrickCount()
9 availableBrickCount = SpwPlugin0.StarDundeeGetAvailableBrickCount()
13 print str(availableBrickCount) + " SpaceWire brick(s) found"
10 print str(availableBrickCount) + " SpaceWire brick(s) found"
14
11
General Comments 0
You need to be logged in to leave comments. Login now