You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+72-2Lines changed: 72 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,17 +9,87 @@ DVM-V24 boards are available from the [W3AXL Online Store](https://store.w3axl.c
9
9
10
10
Schematics for the board are also included in the `hw` directory to build your own adapters.
11
11
12
+
### Hardware Revisions
13
+
14
+
There are two hardware revisions, the original "V1" boards, and the newer "V2" boards. The V2 boards offload the USB->serial functionality to a dedicated CP2102 chip which alleviates some lockup/freezing issues that were encountered with the original V1 hardware.
15
+
16
+
The two hardware revisions require different firmware binaries, but both can be built from the same repository and commands.
17
+
12
18
### The `CLKSEL` Jumper
13
19
14
-
This jumper connects the serial clock line to the `RXCLK` pin. Currently this jumper must be in place for the V24 adapter to work properly. In the future, the board will support external clocking, but for now the firmware only supports generating clocks for both TX & RX.
20
+
This jumper connects the serial clock line to the `RXCLK` pin. Currently this jumper must be in place for the V24 adapter to work properly. Version 1 boards require a jumper to be in place, while version 2 boards have the solder jumper shorted by default. In the future, the boards may support external clocking, but for now the firmware only supports generating clocks for both TX & RX.
21
+
22
+
### `UBT0` and `URST` Jumpers
23
+
24
+
These jumpers are specific to the version 2 boards and enable the RTS and DTR signals of the serial chip to force the board into UART bootloader mode. This will allow for programming using `stm32flash` even without access to the software boot command in `dvmhost`. By default these jumpers are **not** connected and must be bridged with solder to enable RTS/DTR boot control. Note that with these jumpers shorted, the V24 board will reset when `dvmhost` connects.
15
25
16
26
## Firmware
17
27
Firmware is availble in this repo, under the `fw` directory. It's written in bare C, generated from STM32CubeMX. You will need an STLink programmer in order to flash the boards with the latest version of software.
18
28
19
29
### Building the latest firmware
20
30
We recommend building the firmware for the DVM-V24 on a linux-based machine, since it's much easier to set up a working ARM toolchain.
21
31
22
-
Once you have the ARM toolchain installed, simply running `make` will create binary & elf files in a `./build/` directory. These can then be flashed using the STLink using the `make flash` command.
32
+
On debian machines, you will need to install the following packages to build the fw:
33
+
34
+
```bash
35
+
sudo apt install gcc-arm-none-eabi cmake
36
+
```
37
+
38
+
Once you have the everything installed, perform the following steps to prepare the build environment:
39
+
40
+
```bash
41
+
mkdir build
42
+
cd build
43
+
cmake ..
44
+
```
45
+
46
+
Finally, you can build firmware individually for the v1 or v2 boards, or build both binaries:
47
+
48
+
```bash
49
+
# To build for V1 only:
50
+
make dvm-v24-v1
51
+
# or to build for V2:
52
+
make dvm-v24-v2
53
+
# make with no options will build both v1 and v2 binaries
54
+
make
55
+
```
56
+
57
+
### Flashing the firmware
58
+
59
+
#### Using STLink programmer
60
+
61
+
You may use the SWD headers on the board to load firmware via an STLink programmer. This is required for the V1 boards, and on the V2 boards if the firmware becomes corrupted and USB loading no longer works.
62
+
63
+
First make sure the stlink-tools are installed on your system:
64
+
65
+
```bash
66
+
sudo apt install stlink-tools
67
+
```
68
+
69
+
Then you can flash the board by using the following command
70
+
```bash
71
+
st-flash --reset write dvm-v24-xxx.bin 0x8000000
72
+
```
73
+
74
+
#### Using USB flashing
75
+
76
+
DVMV24-V2 boards can be loaded using the ST serial bootloader, in the same way that DVM modems can. First, you must put the board into bootloader mode using `dvmhost` in calibration mode:
77
+
78
+
```bash
79
+
./dvmhost -c <config file.yml> --cal
80
+
```
81
+
82
+
Then, enter bootloader mode using the `!` command. DVMHost will exit, and at this point you can use the stm32flash command:
83
+
84
+
```bash
85
+
stm32flash -v -w ./dvm-v24-v2.bin -R /dev/ttyUSBx
86
+
```
87
+
88
+
If you have the `UBT0` and `URST` jumpers shorted, you can also flash the board using DTR & RTS in a single command as follows:
0 commit comments