Official Radioddity firmware 3.02.04 problem

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

Re: Official Radioddity firmware 3.02.04 problem

Post by VK3KYY » Sun Mar 22, 2020 6:14 am

I have not had time to make a video, but here are the basic instructions

You need a hardware programmer to fix this. e.g. JLink (clones work OK but not the small STM32 Jlink as the Reset pin is missing)
Programmers like this work OK

Image

Unfortunately I checked eBay spain can I can't find any local :-(

JLink Edu is also OK.

Download the JLink software from Segger.com

  • Remove the battery
  • Removed 4 screws at back of radio
  • Remove volume knob
  • Unscrew antenna and volume nut rings
  • Carefully slide and open the radio.
    The front is connected via a ribbon cable for the display / keyboard and also 2 wires for the speaker.
    Probably unsolder the speaker wires and disconnect the ribbon cable from the main PCB, but this is not essential
  • Solder wires to the pads for GND, CLK, DIO RST.
  • Connect these wires to the Jlink.
    On the Jlink it also has a VOUT and VIN. Connect the VOUT to VIN but I don't use this to power the radio.
    Power the radio via the normal connectors to the battery, using a bench PSU
  • In the JLink software (JFLASH)
    Create a new project.
    Select the MCU, which I think is listed under Freescale
    MK22FN512 (either of the 2 possible selections e.g. "allow security"
  • Select Connect in JFLash and check it can connect to the MCU
    If it can't connect, check all your connections
  • When you have a connection.
    Select Target -> Manual Programming ->Erase Chip
  • When the chip is erased it will now have copy protection removed.
  • Download the patched bootloader
    https://github.com/rogerclarkmelbourne/ ... loader.bin
  • Open this file with JFlash. Select address as 0 (zero)
  • Then program with this file
    Target -> Manual Programming -> Program and verify
After the MCU is programmed with the patched bootloader, you should be able to use the normal upload process using the bootloader.

The LED should be permanently on when the bootloader is running.


I hope this helps a little.

EB3EEL
Posts: 37
Joined: Wed Mar 11, 2020 6:35 am

Re: Official Radioddity firmware 3.02.04 problem

Post by EB3EEL » Sun Mar 22, 2020 7:25 am

Hello, i have the same model of jlink in the photo, i connected the wires assuming than the jlink is in SWD mode, this mode has the same names of wires, i find the processor in nxp set the model, make the vin vout jumper,the values in other parameters are the default, but not work, try in power on or power off, same result, if i disconnect the reset wire the radio starst up, when i connect it the radio shut off, there is another settings in the programmer or jflash you remember .
when try to connect the program say InitTarget(): PCode returned with error-1 failed to connect.
i miss something

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

Re: Official Radioddity firmware 3.02.04 problem

Post by VK3KYY » Sun Mar 22, 2020 7:39 am

jlink1.png
jlink1.png (16.25 KiB) Viewed 4761 times
jlink2.png
jlink2.png (4.28 KiB) Viewed 4761 times
jlink3.png
jlink3.png (36.99 KiB) Viewed 4761 times
Which pins did you use on the JLink ?

Connect VTRef to VRef, otherwise there is a message about voltage

Connect the pin SWIO/TMS to the DIO pin
Connect the pin next to it labelled SWCK to the CLK pin
Connect RESET to the RST pin
Connect GND to GND

Sorry I can't remember the exact name of the pads on the PCB, and my board is covered with hot glue over the swd wires to avoid the pads being pulled from the PCB by the weight of the wires

EB3EEL
Posts: 37
Joined: Wed Mar 11, 2020 6:35 am

Re: Official Radioddity firmware 3.02.04 problem

Post by EB3EEL » Sun Mar 22, 2020 8:22 am

hello, i have the wire connections and settings like you say, well in my version the supplier is nxp, but the model is the same, but when i try to connect say error target fail, but i have a extra line that say "connection under reset", i am trying to find where disable this condition, but cant find the correct mode to do it, in the jlink configurator program only give nme a little config panel with no options to set, my soft version is 6,62 i see that you have the 6,14 could be this, sometimes updates disable the clone modules.
The radio is power on or off when flashing?
keep on working and try more...

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

Re: Official Radioddity firmware 3.02.04 problem

Post by VK3KYY » Sun Mar 22, 2020 9:01 am

I'm using an old version of JLink 6.14 because I'm using an old jlink hardware, but it works fine.

So you could try 6.14

I think the connect under reset may be needed because your CPU is still read protected.

I think however, that even before I erased the MCU, that it could connect OK

Reset pin is definitely important when erasing the MCU, it can not happen is the Reset is not connected.

EB3EEL
Posts: 37
Joined: Wed Mar 11, 2020 6:35 am

Re: Official Radioddity firmware 3.02.04 problem

Post by EB3EEL » Sun Mar 22, 2020 9:33 am

Another thing, in the tab options, project, mcu in initsteps, do you have anything?, if this not work, i could buy a new processor, change it and try to begin from zero.
i check the connections again i have the wires soldered inside and closed.
but i dont think this is the problem, maybe the rom is so corrupted that cant connect to it.
this days with the coronnavirus confinement i have a lot of time and try to revive the radio, by now i made radio whit the analogic walky, but miss the dmr, is more fun to connect with many people, some day we can talk with this or the new radio.
Pipa , hope that you can do this procedure to repair your radio.

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

Re: Official Radioddity firmware 3.02.04 problem

Post by VK3KYY » Sun Mar 22, 2020 10:21 am

Its very difficult to replace the MCU its 100 pins

I'm sure you can find a way to connect via the debugger

EB3EEL
Posts: 37
Joined: Wed Mar 11, 2020 6:35 am

Re: Official Radioddity firmware 3.02.04 problem

Post by EB3EEL » Sun Mar 22, 2020 11:11 am

well i keep working on it, if can do something i tell you, from now its enough for today, tomorrow go to my work and try there with analizers to see if there is a problem with signal level or something, maybe the jlink clone, the program talks with it but could not connect well with the radio
have a good day
Salut
MR

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

Re: Official Radioddity firmware 3.02.04 problem

Post by VK3KYY » Sun Mar 22, 2020 8:31 pm

Ok

I can probably make a video of unlocking the TD-5R which has identical processor

All my GD-77 are already unlocked and Jlink does not give me the option to lock the MCU again.

I think there must be a way to lock the processor, using one of the registers, but I don’t know which register. I would need to read the manual for the MCU

EB3EEL
Posts: 37
Joined: Wed Mar 11, 2020 6:35 am

Re: Official Radioddity firmware 3.02.04 problem

Post by EB3EEL » Mon Mar 23, 2020 1:31 pm

WEEELLL. :lol: :lol: finaly the radio works, an stupid mistake in the connections, finally can connect to mcu, reprogram it and its alive now, but some little problems, one is that if i upload an official firmware the radio dont work well, the display is in black blocks and dont do anything, after some tests i find that if install the opengd77 firmware all works, the other problem is that i lost the calibration data and cant write it with flash manager, the program dont find the radio, seems that i have to calibrate the radio manually.
Thankyou so much for your help, now i have to finish the program and enjoy it for a long time.
Salut
MR

Post Reply