Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions M17/md380_mods.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@

## M17 on the MD-380
We are bringing experimental M17 support to the TYT MD-380 DMR radio. However, due to technical limitations of the underlying hardware, transmitting M17 audio on the radio requires two small hardware modifications.
We are bringing experimental M17 support to the TYT MD-380 DMR radio. However, due to technical limitations of the underlying hardware, transmitting and receiving M17 on the radio requires two small hardware modifications.

# __WARNING__
This guide has been updated on **01/06/2022**, if you already performed the mod before the update, you will have to perform a small modification to update your mod! \
The changes between the old and the new mod are **highlighted in yellow**, so check if they match the state of your hardware.
What has changed between the old mod and the new mod is the value and position of the resistor, and the additional removal of a capacitor.
This guide has been updated on **1 June 2022**, if you already performed the mod before the update, you will have to perform a small modification to update your mod! \
What has changed is the additional removal of the C556 capacitor from the RF side of the PCB, described at the end of the RF → MCU section.
For questions join our [community chat](get_in_touch.md), or write us an [email](https://openrtx.org/#/?id=the-openrtx-project).

### Equipment required
To perform the Mic → MCU and RF → MCU mods you need:
- Screwdrivers: Torx T6, Torx T8, Philips #0
- Screwdrivers: Torx T6, Torx T8, Phillips #0
- Plastic spudger like [this](https://it.aliexpress.com/item/32834353313.html) or similar
- 1x 50KΩ SMD (Surface Mount Device) resistor with at least 5% tolerance
- 1x 50 kΩ SMD (Surface Mount Device) resistor with tolerance of 5% or better.
- some 30AWG Kynar wire
- A small tip soldering iron
- A desoldering pump or solder wick
Expand All @@ -36,7 +35,7 @@ To perform the Mic → MCU and RF → MCU mods you need:
The **RF → MCU mod requires also accessing the RF side of the PCB**,
the one which faces the heat sink.

- Remove the 11 Philips #0 screws from the logic side of the PCB \
- Remove the 11 Phillips #0 screws from the logic side of the PCB \
- Remove the 2 Torx T6 screws from the side button PCB \
- Desolder the antenna connector \
The antenna connector is fixed to the heat sink with two screws,
Expand Down Expand Up @@ -71,8 +70,8 @@ After the modification:

Lastly, since STM32 ADCs can only measure positive voltages, to be able to capture the full audio signal we need a DC biased microphone signal.
We are going to take the microphone signal at R158 which is DC biased in the range 0-5V and bridge it to R118 where we want an input range of 0-3.3V.
We recommend to do so by applying a 50KΩ resistor between *C161 or C162 or both* and the microphone signal path, accessible on one of the pads of the EC151 capacitor we just removed.
If you don't have a 50KΩ resistor, anything in the range [40-60]KΩ will work.
We recommend to do so by applying a 50 kΩ resistor between *C161 or C162 or both* and the microphone signal path, accessible on one of the pads of the EC151 capacitor we just removed.
If you don't have a 50 kΩ resistor, anything in the range [40-60] kΩ will work.
Finally, remove the C115 capacitor.

Here is a picture of the applied modification:
Expand All @@ -96,7 +95,7 @@ In this second part of the mod we'll be working on the lower right portion of th
First we will desolder R150: put some flux, heat one side of the resistor, slide it away on one side, heat the other side and slide it away on the other side, heat the pads to clean them up.
This is how the pads should look like after the resistor has been removed:

![MD-380 After having desoldered R101](../_media/md380_rtx_detail_desolder.jpg)
![MD-380 After having desoldered R150](../_media/md380_rtx_detail_desolder.jpg)

Afterward we will bridge with some Kynar wire the left pad of the resistor (2T/5T) with pin 1 of U102, which is the demodulator output. Here is a picture of the finished modification:

Expand All @@ -109,4 +108,8 @@ The filter can be removed by **desoldering the C556 capacitor from the RF side P

### Results

You can put some drops of hot glue to ensure that the resistor and the Kynar wire stay in place.
- You can put some drops of hot glue to ensure that the resistor and the Kynar wire stay in place.
- Close the heat sink over the PCB, paying attention to the side keys PCB.
- Make sure that the antenna connector is screwed exactly perpendicular to the rest of the radio.
- Solder the antenna connector pin.
- Reassemble the radio by following the disassembly instructions backwards.
14 changes: 7 additions & 7 deletions M17/mduv380_mods.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ There are two audio paths that require some hardware modifications:
- RF → MCU: Requires hardware mod

# __WARNING__
This guide has been updated on **18/09/2021**, if you already performed the mod before the update, you will have to perform a small modification to update your mod! \
The changes between the old and the new mod are **highlighted in yellow**, so check if they match the state of your hardware.
This guide has been updated on **18 September 2021**, if you already performed the mod before the update, you will have to perform a small modification to update your mod! \
The changes between the old and the new mod are **highlighted in bold**, so check if they match the state of your hardware.
What has changed between the old mod and the new mod is the value and position of the resistor, and the additional removal of a capacitor.
For questions join our [community chat](get_in_touch.md), or write us an [email](https://openrtx.org/#/?id=the-openrtx-project).

### Equipment required
To perform the Mic → MCU and RF → MCU mods you need:
- Screwdrivers: Torx T6, Torx T8, Philips #0
- Screwdrivers: Torx T6, Torx T8, Phillips #0
- Plastic spudger like [this](https://it.aliexpress.com/item/32834353313.html) or similar
- 1x **50KΩ SMD (Surface Mount Device)** resistor with at least 5% tolerance
- 1x **50 kΩ SMD (Surface Mount Device)** resistor with tolerance of 5% or better
- some 30AWG Kynar wire
- A small tip soldering iron
- A desoldering pump or solder wick
Expand All @@ -46,7 +46,7 @@ To perform the Mic → MCU and RF → MCU mods you need:
Both mods (Mic → MCU and RF → MCU) require accessing the RF side of the PCB,
the one which faces the heat sink.

- Remove the 11 Philips #0 screws from the logic side of the PCB \
- Remove the 11 Phillips #0 screws from the logic side of the PCB \
![MD-UV380 back screws](../_media/uv380_back_screws.jpg)
- Remove the 2 Torx T6 screws from the side button PCB \
![MD-UV380 side screws](../_media/uv380_side_screws.jpg)
Expand Down Expand Up @@ -89,10 +89,10 @@ Steps:
![MD-UV380 Mic mod capacitor removal](../_media/uv380_mic_cap_remove.jpg)
- **Cover the PCB in Kapton tape leaving the left pad of the first capacitor you removed accessible.** \
![MD-UV380 Mic mod adding kapton](../_media/uv380_mic_kapton.jpg)
- **Solder the 50KΩ SMD resistor on the left pad of EC151.** \
- **Solder the 50 kΩ SMD resistor on the left pad of EC151.** \
![MD-UV380 Mic mod soldering resistor](../_media/uv380_mic_resistor.jpg)
- **Solder a piece of Kynar wire from the right pad of the resistor you just soldered to C161 or C162 or both.** \
![MD-UV380 Mix mod finished](../_media/uv380_mic_wire.jpg)
![MD-UV380 Mic mod finished](../_media/uv380_mic_wire.jpg)

**The Mic → MCU mod is now complete, go share it on your favourite social network!**

Expand Down
4 changes: 2 additions & 2 deletions NVM.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ It also implements the following functions defined in interfaces/nvmem.h
* the nvm_getDesc that returns an nvmDescriptor given a device number
* the nvm_readCalib that populates a given buffer with the calibration data
* the nvm_readHwInfo that populates a hwInfo_t structure using data stored in nvm devices
* int nvm_readVFOChannelData that reads the last saved VFO state
* the nvm_readVFOChannelData that reads the last saved VFO state
* nvm_readSettings/nvm_writeSettings that reads/writes the device settings (callsign, accessibility settings, ...)
* nvm_writeSettingsAndVfo that writes the current vfo states as well as the device settings

Expand All @@ -28,7 +28,7 @@ These functions use the functions nvm_read/nvm_write/nvm_erase defined in nvmem_

This layer implements the driver for a particular non-volatile memory device.

An NVM device is represented by an nvmDevice structure. This structure contains pointers to an information structure and an ops structure. It also contains a priv pointer that is differently by each driver.
An NVM device is represented by an nvmDevice structure. This structure contains pointers to an information structure and an ops structure. It also contains a priv pointer that is used differently by each driver.

### ops structure

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ If you are interested in keeping updated with the latest news or you want to joi

#### Acknowledgments:

All this was made possible by the huge reverse engineering effort of Travis Goodspeed and of all the contributors of [md380tools](https://github.com/travisgoodspeed/md380tools), which provided a valuable starting point when we moved our first steps with the MD-380.
All this was made possible by the huge reverse engineering effort of Travis Goodspeed and of all the contributors of [md380tools](https://github.com/travisgoodspeed/md380tools), which provided a valuable starting point when we took our first steps with the MD-380.

Thanks to Roger Clark VK3KYY and all the contributors of the [OpenGD77](http://opengd77.com/) project which both inspired this project and, as a precursor, provided a working code example for the GD77 radio family.

A warm thank goes also to Wojciech Kaczmarski SP5WWP and the [M17](https://m17project.org) community for collaboration and support given during the long process of implementing the M17 protocol in our firmware.
Warm thanks also go to Wojciech Kaczmarski SP5WWP and the [M17](https://m17project.org) community for collaboration and support given during the long process of implementing the M17 protocol in our firmware.

Also thanks for donating hardware to the project to:
* M17 Project
Expand Down
28 changes: 14 additions & 14 deletions at1846_registers.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
##### 0x0A
bit | function | notes
--- | --- | ---
5:0 | PA bias voltage | 000000: 1.01V<br>000001:1.05V<br>000010:1.09V<br>000100: 1.18V<br>001000: 1.34V<br>010000: 1.68V<br>100000: 2.45V<br>1111111:3.13V
5:0 | PA bias voltage | 000000: 1.01V<br>000001:1.05V<br>000010:1.09V<br>000100: 1.18V<br>001000: 1.34V<br>010000: 1.68V<br>100000: 2.45V<br>111111: 3.13V


##### 0x0F
Expand All @@ -29,7 +29,7 @@
##### 0x1F
bit | function | notes
--- | --- | ---
14:15 | GPIO7 mode | 00 = hi-z<br> 01 = vox<br> 10 = low<br> 11 = high
15:14 | GPIO7 mode | 00 = hi-z<br> 01 = vox<br> 10 = low<br> 11 = high
13:12 | GPIO6 mode | 00 = hi-z<br> 01 = squelch or squelch & CTC/DCS when sq_out_sel = 1<br> 10 = low<br> 11 = high
11:10 | GPIO5 mode | 00 = hi-z<br> 01 = txon_rf<br> 10 = low<br> 11 = high
9:8 | GPIO4 mode | 00 = hi-z<br> 01 = rxon_rf<br> 10 = low<br> 11 = high
Expand All @@ -51,12 +51,12 @@
##### 0x2B
bit | function | notes
--- | --- | ---
15:0 | reference clock frequency in kHz | 12\~14MHz: crystal freq1000 <br> 24\~ 28MHz: (crystal freq/2)1000
15:0 | reference clock frequency in kHz | 12\~14MHz: crystal freq (MHz) × 1000 <br> 24\~28MHz: (crystal freq (MHz) / 2) × 1000

##### 0x2C
bit | function | notes
--- | --- | ---
15:0 | ADC clock frequency in kHz | 12\~14MHz: crystal freq1000 <br> 24\~ 28MHz: (crystal freq/2)1000
15:0 | ADC clock frequency in kHz | 12\~14MHz: (crystal freq (MHz) / 2) × 1000 <br> 24\~28MHz: (crystal freq (MHz) / 4) × 1000

##### 0x2D
bit | function | notes
Expand All @@ -67,7 +67,7 @@
6 | dtmf_idle interrupt enable |
5 | ctcss phase shift detect int. enable |
4 | idle state time out int. enable |
3 | rxon_rf timerout interrupt enable |
3 | rxon_rf timeout interrupt enable |
2 | sq interrupt enable |
1 | txon_rf time out interrupt enable |
0 | vox interrupt enable |
Expand All @@ -87,12 +87,12 @@
##### 0x35
bit | function | notes
--- | --- | ---
15:0 | DTMF tone freq 1 | register_value = freq (2^12)
15:0 | DTMF tone freq 1 | register_value = freq (kHz) × 2^12

##### 0x36
bit | function | notes
--- | --- | ---
15:0 | DTMF tone freq 2 | register_value = freq (2^12)
15:0 | DTMF tone freq 2 | register_value = freq (kHz) × 2^12

##### 0x3C
bit | function | notes
Expand Down Expand Up @@ -130,8 +130,8 @@ set to 01) <br> 11 = not Tx any signal
10 | enable CTC/DCS detection |
7 | enable CDCSS inverse code detect |
4 | CDCSS code selection | 1 = 24 bit code<br>0 = 23 bit code
3 | CTCSS code selection | 1 = ctcss_cmp/cdcss_cmp out via gpio<br> 0 = ctcss/cdcss sdo out vio gpio
2:0 | CTC/DCS mode selection | 000 = disable<br> 001 = inner ctcss en<br> 010 = inner cdcss en 101 = outer ctcss en<br> 110 = outer cdcss en <br> others = disable
3 | CTCSS code selection | 1 = ctcss_cmp/cdcss_cmp out via gpio<br> 0 = ctcss/cdcss sdo out via gpio
2:0 | CTC/DCS mode selection | 000 = disable<br> 001 = inner ctcss en<br> 010 = inner cdcss en<br> 101 = outer ctcss en<br> 110 = outer cdcss en <br> others = disable

##### 0x48
bit | function | notes
Expand All @@ -146,17 +146,17 @@ set to 01) <br> 11 = not Tx any signal
##### 0x4A
bit | function | notes
--- | --- | ---
15:0 | CTCSS frequency | CTCSS freq = reg_value2^16 khz.<br> It must be set to 134.4Hz when use standard cdcss mode.<br> When use ctcss/cdcss, this register must be set both in rx and tx state
15:0 | CTCSS frequency | register_value = CTCSS freq (kHz) × 2^16 (e.g. 97.4 Hz → 0.0974 × 2^16 = 6383).<br> It must be set to 134.4Hz when use standard cdcss mode.<br> When use ctcss/cdcss, this register must be set both in rx and tx state

##### 0x4B
bit | function | notes
--- | --- | ---
7:0 | CDCSS code [23:16] | MSB sent first

##### 0x4A
##### 0x4C
bit | function | notes
--- | --- | ---
15:0 | CDCSS code [23:16] |
15:0 | CDCSS code [15:0] |

##### 0x54
bit | function | notes
Expand Down Expand Up @@ -198,8 +198,8 @@ set to 01) <br> 11 = not Tx any signal
bit | function | notes
--- | --- | ---
9:8 | DTMF mode | 11 = transmit or receive Dtmf single tone2<br> 01 =transmit or receive Dtmf dual tone1+tone2<br> others = disable
7:4 | DTMF time 1 | Time interval for dual tone transmission. Time = register_value5ms
3:0 | DTMF time 2 | Time interval for DTMF idle state. Time = register_value5ms
7:4 | DTMF time 1 | Time interval for dual tone transmission. Time = register_value × 5ms
3:0 | DTMF time 2 | Time interval for DTMF idle state. Time = register_value × 5ms

##### 0x66
bit | function | notes
Expand Down
2 changes: 1 addition & 1 deletion binary_cps_format.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ For DMR contacts, this section is laid out in the following manner:
| --------------- | ----------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| mode | uint8_t | Operating mode; refer to [Mode lookup table](#mode-lookup-table) |
| traits | uint8_t | First two bits are channel bandwidth (refer to [Bandwidth lookup table](#bandwidth-lookup-table)), then one bit indicating true if the channel is RX only |
| power | uint8_t | transmit power, stored as number of fifths dBm added to 10bBm (e.g. a value of 5 would represent 10+5\*0.2=11dBm) |
| power | uint8_t | transmit power, stored as number of fifths dBm added to 10dBm (e.g. a value of 5 would represent 10+5\*0.2=11dBm) |
| rx_frequency | uint32_t | RX frequency in Hz |
| tx_frequency | uint32_t | TX frequency in Hz |
| scanList_index | uint8_t | "Scan List: None, ScanList1...250" |
Expand Down
Loading
Loading