aboutsummaryrefslogtreecommitdiffstats
path: root/doc/pio.txt
blob: 3332cc711c688f041870ceffaa8ac8840d150db0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Allocation of PIOs to functions
===============================

Ref: Datasheet Table 7 on p. 45 and Table 9 on p. 60

Connexions Relais
-----------------
-       in   QRP_n              PC1
-       out  TX_ON              PC2
-       N/A  microphone         PC3
-       in   1750_n bouton      PC4
-       out  MOD_OFF            PC5
-       in   SQ_n               PC6
-       in   U                  PC8
-       out  QRP                PC9
-       in   D                  PC11
-       in   REPLIE             PC13
-       out  FAX                PC14
-       out  GPS EPPS           PC15
-       out  SQ2                PC0 (ATTN: is also enabling 5V USB OTG, turns on LD7)
-       out  DET 1750           PA8

-       i/o  Dallas 1-wire      PA1

Analog signals
--------------

on ADC1, configured in single-shot mode, software trigger:
-       in   Vcc 12V            PA5 (ADC12 IN5)
-       in   SWR forward        PA6 (ADC12 IN6)
-       in   SWR reflected      PA7 (ADC12 IN7)

on ADC2, configured in single-shot mode, triggered by a timer:
-       in   NF (demod audio)   PB1 (ADC12 IN9)

u-blox NEO-M8N GPS module connection
------------------------------------
Yellow  out  UART3 TX to GPS RX PD8
Orange  in   UART3 RX to GPS TX PD9
-       out  GPS RESET_n        PD10

Debug USART
-----------
-       out  UART2 TX to PC RX  PA2
-       in   UART2 RX to PC TX  PA3

I2C to Audio Codec
------------------
-       o    codec reset        PD4
-       -    I2S3 MCK           PC7
-       -    I2S3 CK            PC10
-       -    I2S3 SD            PC12
-       -    I2S3 WS            PA4
-       i/o  I2C1 SDA           PB9
-       i/o  I2C1 SCL           PB6

STM32DISCOVERY onboard things
-----------------------------
-       out  Green LED (launcher) PD12
-       out  Orange LED (fsm)     PD13
-       out  Red LED (audio)      PD14
-       out  Blue LED (audio in)  PD15
-       in   Blue Push Button     PA0


Analog audio input for 1750 tone detector
-----------------------------------------

1. Timer 6 set to 8kHz triggers ADC2 sample.
1. Timer 6 ISR accumulates N samples into a buffer.
1. When buffer full, copy it into queue.
1. `nf_analyse` task retrieves audio from queue, and gives it to tone detector.
1. Tone detector returns one of [yes, no, more samples needed].
1. `nf_analyse` task updates FSM input accordingly.