Experimental support for non-genuine CPU in new radios
Posted: 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
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