Official Radioddity firmware 3.02.04 problem

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

Re: Official Radioddity firmware 3.02.04 problem

Post by VK3KYY » Sat Mar 21, 2020 10:16 pm

pipa wrote:
Sat Mar 21, 2020 9:21 pm
My radio cannot start S1 + S2 and switch power to firmware update mode. The green LED just flashes and the radio switches to normal mode.
This happens when the hardware lock bytes on the MCU ROM have been erased.

The only way to solve this is to reload the bootloader by directly connecting to the hardware using a debugger like a JLink.

I have made "patched" (modified) bootloader with hardware lock check removed

https://github.com/rogerclarkmelbourne/ ... ootloaders

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

Re: Official Radioddity firmware 3.02.04 problem

Post by EB3EEL » Sun Mar 22, 2020 5:52 am

Hello pipa, we are in the same problem,i search over internet on how to load flash on the radio and cant find something ,VK3KYY if you know how to do it, can you help us making a guide on wich program and the process to recover our radios?
It could help us and another people to enjoy the radio again, we can wait for your time.
Thanks
MR
Miquel EB3EEL 2143638 Barcelona, Catalunya, Spain

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

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: 29
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
Miquel EB3EEL 2143638 Barcelona, Catalunya, Spain

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

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 247 times
jlink2.png
jlink2.png (4.28 KiB) Viewed 247 times
jlink3.png
jlink3.png (36.99 KiB) Viewed 247 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

pipa
Posts: 3
Joined: Sat Mar 21, 2020 2:25 pm

Re: Official Radioddity firmware 3.02.04 problem

Post by pipa » Sun Mar 22, 2020 7:48 am

Thank you for the instructions, good work. Video tutorial would be great too, especially for working with JLink software :-)
My radio is new. I will try to go the way of complaint. If it fails, I will follow the instructions.
Thanks again.

EB3EEL
Posts: 29
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...
Miquel EB3EEL 2143638 Barcelona, Catalunya, Spain

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

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: 29
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.
Miquel EB3EEL 2143638 Barcelona, Catalunya, Spain

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

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

Post Reply