GettingStarted » History » Version 3
laforge, 02/19/2016 10:50 PM
1 | 1 | laforge | = Firmware build = |
---|---|---|---|
2 | |||
3 | * check out at91lib.git and osmo-sdr.git into the same ancestor directory |
||
4 | * change to osmo-sdr/firmware/sdr-test-project |
||
5 | * 'make flash' |
||
6 | * use rum-ba to flash it: |
||
7 | * rumba /dev/ttyACM0 flashmcu osmo-sdr-test-osmo-sdr-at91sam3u4-flash.bin |
||
8 | |||
9 | = Firmware usage guide = |
||
10 | |||
11 | == Serial console == |
||
12 | |||
13 | On the serial console, you can enter three types of commands: |
||
14 | * actions denoted by ! at the line end |
||
15 | * getting a value, denoted by a ? at the line end |
||
16 | * setting a value in key=value notation |
||
17 | |||
18 | A list of commands can be obtained by entering ? on an empty line |
||
19 | |||
20 | Enter always re-sets the parser, so you can abort any unfinished command with enter |
||
21 | |||
22 | === Examples === |
||
23 | |||
24 | {{{ |
||
25 | 3 | laforge | > tuner.init! |
26 | > tuner.freq=88300000 |
||
27 | > tuner.gain=2,2,2,2,2,2 |
||
28 | > tuner.freq? |
||
29 | tuner.freq:88299997 |
||
30 | 1 | laforge | }}} |
31 | === Reference === |
||
32 | {{{ |
||
33 | ? |
||
34 | Supported commands: |
||
35 | 3 | laforge | tuner.init -- Initialize the tuner |
36 | tuner.freq -- Tune to the specified frequency |
||
37 | tuner.gain -- Tune to the specified gain |
||
38 | tuner.flt_bw_mix -- Filter bandwidth (Mixer) |
||
39 | tuner.flt_bw_chan -- Filter bandwidth (Channel) |
||
40 | tuner.flt_bw_rc -- Filter bandwidth (RC) |
||
41 | si570.freq -- Change the SI570 clock frequency |
||
42 | si570.dump -- Dump SI570 registers |
||
43 | fpga.dump -- Dump FPGA registers |
||
44 | fpga.pwm1_div -- PWM divider, Freq = 80MHz/(div+1) |
||
45 | fpga.pwm1_duty -- PWM duty cycle |
||
46 | fpga.pwm2_div -- PWM divider, Freq = 80MHz/(div+1) |
||
47 | fpga.pwm2_duty -- PWM duty cycle |
||
48 | fpga.adc_clkdiv -- FPGA Clock Divider for ADC (80 MHz/CLKDIV) |
||
49 | fpga.adc_acqlen -- Num of SCK cycles nCS to AD7357 is held high betewen conversions |
||
50 | ssc.start -- Start the SSC Receiver |
||
51 | ssc.stop -- Start the SSC Receiver |
||
52 | ssc.stats -- Statistics about the SSC |
||
53 | ssc.dump -- Dump SSC DMA registers |
||
54 | 1 | laforge | }}} |
55 | |||
56 | |||
57 | == Taking a capture == |
||
58 | |||
59 | 1. flash the firmware |
||
60 | 1. connect the device to usb, it should enumerate as usb audio device |
||
61 | 1. connect to the UART |
||
62 | 1. issue the following commands once |
||
63 | 1. {{{tuner.init!}}} |
||
64 | 2 | laforge | 1. {{{tuner.freq=88300000}}} |
65 | 1. start your audio recording app, e.g. {{{arecord -c 2 -f S16_LE -D hw:1,0 foo.wav}}} |
||
66 | 3 | laforge | |
67 | You can re-tune the frequency and/or issue other commands while the transfer of samples is running. |
||
68 | 1 | laforge | |
69 | The bottom green led under the antenna socket should be dark green, not completely off. |
||
70 | |||
71 |