10W UV380/UV390 PLUS - WORK IN PROGRESS

VK3KYY
Posts: 7590
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia

Re: 10W UV380/UV390 PLUS VERSIONS NOT CURRENTLY SUPPORTED

Post by VK3KYY » Wed Jan 31, 2024 7:19 am

R2ZFN wrote:
Wed Jan 31, 2024 7:15 am
VK3KYY wrote:
Wed Jan 31, 2024 7:01 am
R2ZFN wrote:
Wed Jan 31, 2024 6:57 am
Hi !
I am attaching a screenshot from the TYT 390 Plus 10W radio station.
I have a 5W and 10W radio station available. The 10W version has a 50% lower backlight ( this is not a defect). I tried to put the front panel from 10W to the 5W version, and everything works correctly there. Including smooth brightness adjustment.
Did you try this version

downloads/MDUV380_DM1701/Firmware/88559 ... DUV380.zip
Yes. installed this version.
Sorry. Silly question. Of course you must have installed it.

Does FM still not work. ?

Make sure the screen is set to 100% brightness

PS for FM was the problem that the screen was not on , or did it completely not work ?

R2ZFN
Posts: 16
Joined: Tue Dec 12, 2023 9:44 am

Re: 10W UV380/UV390 PLUS VERSIONS NOT CURRENTLY SUPPORTED

Post by R2ZFN » Wed Jan 31, 2024 7:30 am

Yes, it still doesn't work. Now I'm uploading videos to the exchanger.

https://mega.nz/folder/V6pUiYoC#Qfzuwed9Tj3koVwoQYvX2g

VK3KYY
Posts: 7590
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia

Re: 10W UV380/UV390 PLUS VERSIONS NOT CURRENTLY SUPPORTED

Post by VK3KYY » Wed Jan 31, 2024 8:04 am

R2ZFN wrote:
Wed Jan 31, 2024 7:30 am
Yes, it still doesn't work. Now I'm uploading videos to the exchanger.

https://mega.nz/folder/V6pUiYoC#Qfzuwed9Tj3koVwoQYvX2g
OK. Thanks

VK3KYY
Posts: 7590
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia

Re: 10W UV380/UV390 PLUS VERSIONS NOT CURRENTLY SUPPORTED

Post by VK3KYY » Wed Jan 31, 2024 8:42 am

R2ZFN wrote:
Wed Jan 31, 2024 7:30 am
Yes, it still doesn't work. Now I'm uploading videos to the exchanger.

https://mega.nz/folder/V6pUiYoC#Qfzuwed9Tj3koVwoQYvX2g
Connect the USB cable to the radio

Open a terminal program to the COM port of the radio (I use Termite)

Send the letter D

Radio should respond with

Debug mode ON

If you don't get this response then check you are using the correct COM port number.
Disconnect and reconnect the terminal program

When you have successfully sent D and received "Debug mode ON"

Send this command

PD8 T

Response should be

PD8 T > Toggle pin D8 = Low

Send PD8 T

Response should be
PD8 T > Toggle pin D8 = High


This should be turning the LCB backlight on and off by directly controlling the GPIO pin on the CPU/MCU


Now try the radio in FM mode , when the screen goes off, and see if the screen comes back on again

PS.
The CPS functions do not work in Debug Mode
Rebooting will exit debug mode.

R2ZFN
Posts: 16
Joined: Tue Dec 12, 2023 9:44 am

Re: 10W UV380/UV390 PLUS VERSIONS NOT CURRENTLY SUPPORTED

Post by R2ZFN » Wed Jan 31, 2024 8:50 am

VK3KYY wrote:
Wed Jan 31, 2024 8:42 am

This should be turning the LCB backlight on and off by directly controlling the GPIO pin on the CPU/MCU


Now try the radio in FM mode , when the screen goes off, and see if the screen comes back on again

PS.
The CPS functions do not work in Debug Mode
Rebooting will exit debug mode.
I checked - with the value - HIGH, the old version of the PCB is fine, but the new version of the PCB does not light up.
Last edited by R2ZFN on Wed Jan 31, 2024 8:56 am, edited 1 time in total.

VK3KYY
Posts: 7590
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia

Re: 10W UV380/UV390 PLUS VERSIONS NOT CURRENTLY SUPPORTED

Post by VK3KYY » Wed Jan 31, 2024 8:53 am

R2ZFN wrote:
Wed Jan 31, 2024 8:50 am
I checked - when the value is - HIGH, it does not light up.


In DMR mode does toggling this pin turn the LCD backlight on / off ?


I should explain

The command is the GPIO pin name (PD8) and then the action of T for Toggle

It is also possible to send H and L to any output pin

e.g.

PD8 H

or

PD8 L

Also the command

PD8 O

sets the pin as Output, but it should already be set to Output

PD8 I

sets the pin to input, but this is not appropriate for this pin

PD8 ?

will read PD8

etc
etc

R2ZFN
Posts: 16
Joined: Tue Dec 12, 2023 9:44 am

Re: 10W UV380/UV390 PLUS VERSIONS NOT CURRENTLY SUPPORTED

Post by R2ZFN » Wed Jan 31, 2024 9:04 am

VK3KYY wrote:
Wed Jan 31, 2024 8:53 am
R2ZFN wrote:
Wed Jan 31, 2024 8:50 am
I checked - when the value is - HIGH, it does not light up.


In DMR mode does toggling this pin turn the LCD backlight on / off ?


I should explain

The command is the GPIO pin name (PD8) and then the action of T for Toggle

It is also possible to send H and L to any output pin

e.g.

PD8 H

or

PD8 L

Also the command

PD8 O

sets the pin as Output, but it should already be set to Output

PD8 I

sets the pin to input, but this is not appropriate for this pin

PD8 ?

will read PD8

etc
etc
PD1-PD11 no working

VK3KYY
Posts: 7590
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia

Re: 10W UV380/UV390 PLUS VERSIONS NOT CURRENTLY SUPPORTED

Post by VK3KYY » Wed Jan 31, 2024 9:07 am

Do not randomly try other pins , you may damage your radio

Every pin does different things

This is the pin definitions from the source code

Code: Select all

#define DMR_SPI_CS_Pin GPIO_PIN_2
#define DMR_SPI_CS_GPIO_Port GPIOE
#define DMR_SPI_CLK_Pin GPIO_PIN_3
#define DMR_SPI_CLK_GPIO_Port GPIOE
#define DMR_SPI_MOSI_Pin GPIO_PIN_4
#define DMR_SPI_MOSI_GPIO_Port GPIOE
#define DMR_SPI_MISO_Pin GPIO_PIN_5
#define DMR_SPI_MISO_GPIO_Port GPIOE
#define C6000_PWD_Pin GPIO_PIN_6
#define C6000_PWD_GPIO_Port GPIOE
#define TIME_SLOT_INTER_Pin GPIO_PIN_0
#define TIME_SLOT_INTER_GPIO_Port GPIOC
#define TIME_SLOT_INTER_EXTI_IRQn EXTI0_IRQn
#define SYS_INTER_Pin GPIO_PIN_1
#define SYS_INTER_GPIO_Port GPIOC
#define SYS_INTER_EXTI_IRQn EXTI1_IRQn
#define RF_TX_INTER_Pin GPIO_PIN_2
#define RF_TX_INTER_GPIO_Port GPIOC
#define RF_TX_INTER_EXTI_IRQn EXTI2_IRQn
#define ADC_VOLUME_Pin GPIO_PIN_0
#define ADC_VOLUME_GPIO_Port GPIOA
#define Battery_voltage_Pin GPIO_PIN_1
#define Battery_voltage_GPIO_Port GPIOA
#define R5_U_SW_Pin GPIO_PIN_2
#define R5_U_SW_GPIO_Port GPIOA
#define VOX_Pin GPIO_PIN_3
#define VOX_GPIO_Port GPIOA
#define APC_REF_Pin GPIO_PIN_4
#define APC_REF_GPIO_Port GPIOA
#define R5_V_SW_Pin GPIO_PIN_5
#define R5_V_SW_GPIO_Port GPIOA
#define KEYPAD_ROW0_Pin GPIO_PIN_6
#define KEYPAD_ROW0_GPIO_Port GPIOA
#define PWR_SW_Pin GPIO_PIN_7
#define PWR_SW_GPIO_Port GPIOA
#define PA_EN_2_Pin GPIO_PIN_4
#define PA_EN_2_GPIO_Port GPIOC
#define PA_EN_1_Pin GPIO_PIN_5
#define PA_EN_1_GPIO_Port GPIOC
#define LCD_D4_Pin GPIO_PIN_7
#define LCD_D4_GPIO_Port GPIOE
#define LCD_D5_Pin GPIO_PIN_8
#define LCD_D5_GPIO_Port GPIOE
#define LCD_D6_Pin GPIO_PIN_9
#define LCD_D6_GPIO_Port GPIOE
#define LCD_D7_Pin GPIO_PIN_10
#define LCD_D7_GPIO_Port GPIOE
#define PTT_Pin GPIO_PIN_11
#define PTT_GPIO_Port GPIOE
#define PTT_EXTERNAL_Pin GPIO_PIN_12
#define PTT_EXTERNAL_GPIO_Port GPIOE
#define ROTARY_SW_A_Pin GPIO_PIN_14
#define ROTARY_SW_A_GPIO_Port GPIOE
#define ROTARY_SW_B_Pin GPIO_PIN_11
#define ROTARY_SW_B_GPIO_Port GPIOB
#define ROTARY_SW_B_EXTI_IRQn EXTI15_10_IRQn
#define V_SPI_CS_Pin GPIO_PIN_12
#define V_SPI_CS_GPIO_Port GPIOB
#define SPI2_SCK_Pin GPIO_PIN_13
#define SPI2_SCK_GPIO_Port GPIOB
#define SPI2_MISO_Pin GPIO_PIN_14
#define SPI2_MISO_GPIO_Port GPIOB
#define SPI2_MOSI_Pin GPIO_PIN_15
#define SPI2_MOSI_GPIO_Port GPIOB
#define LCD_BKLIGHT_Pin GPIO_PIN_8
#define LCD_BKLIGHT_GPIO_Port GPIOD
#define RX_AUDIO_MUX_Pin GPIO_PIN_9
#define RX_AUDIO_MUX_GPIO_Port GPIOD
#define LCD_RS_Pin GPIO_PIN_12
#define LCD_RS_GPIO_Port GPIOD
#define LCD_RST_Pin GPIO_PIN_13
#define LCD_RST_GPIO_Port GPIOD
#define LCD_D0_Pin GPIO_PIN_14
#define LCD_D0_GPIO_Port GPIOD
#define LCD_D1_Pin GPIO_PIN_15
#define LCD_D1_GPIO_Port GPIOD
#define PA_SEL_SW_Pin GPIO_PIN_6
#define PA_SEL_SW_GPIO_Port GPIOC
#define CTC_DCS_PWM_Pin GPIO_PIN_7
#define CTC_DCS_PWM_GPIO_Port GPIOC
#define BEEP_PWM_Pin GPIO_PIN_8
#define BEEP_PWM_GPIO_Port GPIOC
#define GPS_EN_Pin GPIO_PIN_9
#define GPS_EN_GPIO_Port GPIOA
#define GPS_RX_Pin GPIO_PIN_10
#define GPS_RX_GPIO_Port GPIOA
#define MICPWR_SW_Pin GPIO_PIN_13
#define MICPWR_SW_GPIO_Port GPIOA
#define LCD_D2_Pin GPIO_PIN_0
#define LCD_D2_GPIO_Port GPIOD
#define LCD_D3_Pin GPIO_PIN_1
#define LCD_D3_GPIO_Port GPIOD
#define KEYPAD_ROW1_Pin GPIO_PIN_2
#define KEYPAD_ROW1_GPIO_Port GPIOD
#define KEYPAD_ROW2_Pin GPIO_PIN_3
#define KEYPAD_ROW2_GPIO_Port GPIOD
#define LCD_RD_Pin GPIO_PIN_4
#define LCD_RD_GPIO_Port GPIOD
#define LCD_WR_Pin GPIO_PIN_5
#define LCD_WR_GPIO_Port GPIOD
#define LCD_CS_Pin GPIO_PIN_6
#define LCD_CS_GPIO_Port GPIOD
#define SPI_Flash_CS_Pin GPIO_PIN_7
#define SPI_Flash_CS_GPIO_Port GPIOD
#define SPI1_SCK_Pin GPIO_PIN_3
#define SPI1_SCK_GPIO_Port GPIOB
#define SPI1_SDO_Pin GPIO_PIN_4
#define SPI1_SDO_GPIO_Port GPIOB
#define SPI1_SDI_Pin GPIO_PIN_5
#define SPI1_SDI_GPIO_Port GPIOB
#define SPK_MUTE_Pin GPIO_PIN_8
#define SPK_MUTE_GPIO_Port GPIOB
#define AUDIO_AMP_EN_Pin GPIO_PIN_9
#define AUDIO_AMP_EN_GPIO_Port GPIOB
#define LED_GREEN_Pin GPIO_PIN_0
#define LED_GREEN_GPIO_Port GPIOE
#define LED_RED_Pin GPIO_PIN_1
#define LED_RED_GPIO_Port GPIOE

VK3KYY
Posts: 7590
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia

Re: 10W UV380/UV390 PLUS VERSIONS NOT CURRENTLY SUPPORTED

Post by VK3KYY » Wed Jan 31, 2024 10:38 pm

Guys

I will not be able to resolve the problem with the 10W radios myself, unless TYT decide to send me a 10W radio, which is unlikely as its almost impossible to get in touch with them.

I have now posted all the debugging tools and information that are necessary to understand the connection to the LCD backlight pin etc.

So I have to leave it to the owners of the radios which have the backlight problem, to attempt to probe this themselves, as described above

VK3KYY
Posts: 7590
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia

Re: 10W UV380/UV390 PLUS VERSIONS NOT CURRENTLY SUPPORTED

Post by VK3KYY » Fri Feb 02, 2024 10:33 am

For anyone using the debugging tools, I've now made a pin list

Code: Select all

ADC_VOLUME          PA0
Battery_voltage     PA1
RX_UHF_LNA          PA2
VOX                 PA3
PA_DRIVE_DAC        PA4
RX_VHF_LNA          PA5
KEYPAD_ROW0         PA6
PWR_SW              PA7
TBD                 PA8
GPS_EN              PA9
GPS_RX              PA10
TBD                 PA11
TBD                 PA12
MIC_PWR             PA13
             
TBD                 PB0
TBD                 PB1
TBD                 PB2
SPI1_SCK            PB3
SPI1_SDO            PB4
SPI1_SDI            PB5
TBD                 PB6
TBD                 PB7
SPK_MUTE            PB8
AUDIO_AMP_EN        PB9
TBD                 PB10
ROTARY_SW_B         PB11
V_SPI_CS            PB12
SPI2_SCK            PB13
SPI2_MISO           PB14
SPI2_MOSI           PB15
             
TIME_SLOT_INTER     PC0
SYS_INTER           PC1
RF_TX_INTER         PC2
TBD                 PC3
PA_EN_2             PC4
PA_EN_1             PC5
PA_BAND_SEL         PC6
CTC_DCS_PWM         PC7
BEEP_PWM            PC8
TBD                 PC9
TBD                 PC13
             
LCD_D2              PD0
LCD_D3              PD1
KEYPAD_ROW1         PD2
KEYPAD_ROW2         PD3
LCD_RD              PD4
LCD_WR              PD5
LCD_CS              PD6
SPI_Flash_CS        PD7
LCD_BKLIGHT         PD8
RX_AUDIO_MUX        PD9
TBD                 PD10
TBD                 PD11
LCD_RS              PD12
LCD_RST             PD13
LCD_D0              PD14
LCD_D1              PD15
             
LED_GREEN           PE0
LED_RED             PE1
DMR_SPI_CS          PE2
DMR_SPI_CLK         PE3
DMR_SPI_MOSI        PE4
DMR_SPI_MISO        PE5
C6000_PWD           PE6
LCD_D4              PE7
LCD_D5              PE8
LCD_D6              PE9
LCD_D7              PE10
PTT                 PE11
PTT_EXTERNAL        PE12
TBD                 PE13
ROTARY_SW_A         PE14
TBD                 PE15

Because I don't have a UV380 Plus, and can't afford to buy yet another brand new radio to dissassemble and potentially damage, I'm not able to debug the problem some people are having with the backlight when the radio is set to FM


The exterimental version I posted a few days ago, has a serial terminal debugging function, which is accessed by sending the letter D to the radio
The radio should response with "Debug mode ON", if this does not happen, close and reopen the serial terminal connection and try again

Make sure the backlight brightness is set to 100%

Using the debug mode, you can read or write any of the pins listed above

Specifically if the radio is in FM mode and the backlight is not on, issue the command

PD8 H

This sill set the LCD backlight control signal to high and should turn on the backlight.

If this does not work, go into DMR mode, when in theory the backlight may be turned on, and try toggling the backlight On and off using

PD8 T

or
PD8 H
PD8 L

If this does not affect the backlight, then probably the backlight is no longer connected to pin PD8

In the list above there are a number of pins which are potentially unused, and these are described as TBD

To set a pin as output pin use

PxY O

e.g.

PC3 O

this should initially set PC3 to logic low

Now try

PC3 T

etc

If the pin does not seem to control the backlight, set it back to Input mode, otherwise you may damage the CPU chip

e.g.

PC3 I

Then try another TBD pin


If none of the TBD pins seem to control the backlight, then its hard to kow which other pin could have been repurposed if all other functionality in the radio is still working OK.

i.e It can't be using the SPI or I2C communication pins, or the PA control, or the Rx LNAs, etc otherwise the radio would not work correctly in DMR mode etc


PS.

When a pin is in Input mode you can use ? to read the value of that pin e.g.

PC3 ?

Post Reply