Experimental support for non-genuine CPU in new radios

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

Experimental support for non-genuine CPU in new radios

Post by VK3KYY » Sun Feb 19, 2023 9:49 pm

TYT replaced the STM32F405VTG CPU in radios manfactured at the end of 2022 with an unbranded clone IC

This clone CPU did not work with the firmware

After a lot of work by Colin and myself, with the help of VE2NCK for testing, we have identified the problem with the clone chip.

The problem is that it only supports different interrupt 8 Interrupt priorities, instead of 16 in the genuine CPU.

The reason the firmware would not even boot up, was because we use FreeRTOS as the operating system in the firmware and it checks that the CPU provides 16 levels of interrupt priority


To cut a long story short, we were able to change the firmware, so that it only uses 8 levels of interrupt priority, this included modifying FreeRTOS

Technically the changes are a hack, because the interrupt priority numbers we use are still 0 to 15, as the range could not be changed, however as the least significant bit of the interrupt priority register is missing in the clone CPU, we could not use adjacent priority numbers which would map to the same priority on the clone CPU

The result however is that we were able to create one firmware binary that will work with both the genuine and clone/fake CPU

Currently we have only published this new version for testing and have not put it into the Latest firmware folder.

The latest files can be downloaded from here

downloads/MDUV380/Firmware/5ed1bcc0433f ... ed6ab7e7f/

Note. We have not tested the Japanese (JA) version

CU7AAZ
Posts: 76
Joined: Sat Mar 26, 2022 8:13 pm
Location: Azores

Re: Experimental support for non-genuine CPU in new radios

Post by CU7AAZ » Sun Feb 19, 2023 11:10 pm

You are the best!
Good team

Good health to you all

73s

1DangerMouse
Posts: 20
Joined: Sun May 03, 2020 12:31 am

Re: Experimental support for non-genuine CPU in new radios

Post by 1DangerMouse » Mon Feb 20, 2023 5:59 am

Yes, and so Far Seems to be working Well. I congratulate the efforts going into this Firmware and making it happen and get working, thought we may have had no hope with the Fake Clone CPU. So after Flashing the New Firmware this morning so far been happy with, but still need more testing and from others with a be Non Genuine CPU Clone with the latest Serial Numbers.

Well Done 😊👍

G7JIQ
Posts: 25
Joined: Tue Jan 19, 2021 10:47 am

Re: Experimental support for non-genuine CPU in new radios

Post by G7JIQ » Mon Feb 20, 2023 6:37 am

Well done to all,
I will be trying it later and will post my results.

User avatar
Ik0nwg
Posts: 242
Joined: Sat Nov 16, 2019 7:23 am
Location: JN61VG
Contact:

Re: Experimental support for non-genuine CPU in new radios

Post by Ik0nwg » Mon Feb 20, 2023 7:02 am

works correctly even on my old model radio ... you are fantastic !!! Thank you
Ciao
Sal

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

Re: Experimental support for non-genuine CPU in new radios

Post by VK3KYY » Mon Feb 20, 2023 10:01 am

Ik0nwg wrote:
Mon Feb 20, 2023 7:02 am
works correctly even on my old model radio ... you are fantastic !!! Thank you
Ciao
Sal
Initially we thought it may be necessary to have 2 different versions of firmware, but we were able to eventually design a solution which would work with both the genuine and non-genuine CPU.

I will eventually release this new version as the "Latest" after it has some more testing on both old and new radios.

User avatar
Ik0nwg
Posts: 242
Joined: Sat Nov 16, 2019 7:23 am
Location: JN61VG
Contact:

Re: Experimental support for non-genuine CPU in new radios

Post by Ik0nwg » Mon Feb 20, 2023 10:30 am

VK3KYY wrote:
Mon Feb 20, 2023 10:01 am
Ik0nwg wrote:
Mon Feb 20, 2023 7:02 am
works correctly even on my old model radio ... you are fantastic !!! Thank you
Ciao
Sal
Initially we thought it may be necessary to have 2 different versions of firmware, but we were able to eventually design a solution which would work with both the genuine and non-genuine CPU.

I will eventually release this new version as the "Latest" after it has some more testing on both old and new radios.
Excellent work! as always! Thanks Roger and thanks Colin
Ciao

OE1MWW
Posts: 106
Joined: Sat Oct 17, 2020 2:20 pm
Location: JN88EG
Contact:

Re: Experimental support for non-genuine CPU in new radios

Post by OE1MWW » Mon Feb 20, 2023 12:42 pm

old RT3S SN2104...
- firmware works
- QuickKey bug has been solved (Thanks!)

73's de OE1MWW
Wolfgang

G7JIQ
Posts: 25
Joined: Tue Jan 19, 2021 10:47 am

Re: Experimental support for non-genuine CPU in new radios

Post by G7JIQ » Mon Feb 20, 2023 9:47 pm

Following on from my previous post installing the new software on a new cloned cpu radio.

All looks very good, Only two small bugs that stand out so far.

The DTMF auto dialer sticks on the first tone, the tx on timing is ok.

The power levels, when I first installed the software the power levels on all frequencys were very very low,
The calibrate menu works like a charm, and all is now working how it should be.

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

Re: Experimental support for non-genuine CPU in new radios

Post by VK3KYY » Mon Feb 20, 2023 10:10 pm

G7JIQ wrote:
Mon Feb 20, 2023 9:47 pm
Following on from my previous post installing the new software on a new cloned cpu radio.

All looks very good, Only two small bugs that stand out so far.

The DTMF auto dialer sticks on the first tone, the tx on timing is ok.

The power levels, when I first installed the software the power levels on all frequencys were very very low,
The calibrate menu works like a charm, and all is now working how it should be.
Do you have a radio with the fake CPU in it ?

DTMF auto dialer works OK for me with a genuine CPU. It seems unlikely that the CPU would be affacting this if everything else is working.

Power levels on virually all of these Chinese radios can be wildly inaccure. I don't think they bother to calibrate the power in the factory

Post Reply