Fixing flash in DM365 chip within Ph3 Pro gimbal

Hello everyone, everything good ? The days I have been following the forum, and helped me a lot with my phanton 3 pro, where I managed to flash the firmware on chip nand, but I wonder if after I made my phanton work, the problem can come back? What to do to prevent that from the problem? And if the problem persists, should I change the NAND? where can i buy a chip nand flash?

Sorry for my english, but I'm in Brazil, and I'm using google translator ...
 
Last edited:
Please.. is there a place in the UK that can take my gimble board and do the flashing for me as I've failed at the first fence. Big credit to instructions in 1st post Quaddamage but way beyond my skills

edit.. finally flashed it myself following amazing instructions thank you !
 
Last edited:
@quaddamage Firstly, many thanks for your invaluable work. Without it, many of us would have thrown in the towel long ago.
My long story short: Have removed nand flash chip (Classic half moon crack from yaw arm after crash) and waiting on replacement shipment from Digikey. Gimbal motors now setup fine at power up after replacement yaw arm and flat poly cable. Camera records video and photos fine to micro SD card. Only problem, of course, no FPV especially now since nand chip removed. Tried re-flashing chip initially, but standard " Target: NAND_open() failed!Starting UART Boot... " response. Also there was no DM365 boot data received on power up (boot pins disconnected from 3V3).
Question: I understand the Windows DOS command prompt to re-flash the new nand flash when it arrives, but just curious about the other programming that still needs to done following this.
My question: Must this all be done on a Linux OS machine ?
If so, then I'll have to install Linux on a new partition. Wouldn't be the first time I had to learn something new to solve a problem.
Many thanks from New Zealand.
 
I understand the Windows DOS command prompt to re-flash the new nand flash when it arrives, but just curious about the other programming that still needs to done following this.

Yes, the Serial Flash Tool from Texas Instruments comes with Windows Command Line build.

Note that it's not really DOS you use - DOS was a 16-bit real mode operating system with most of its functions bound to interrupt 0x21; there is no real mode emulation nor the old interrupt anymore. Now it's just a command line shell, like you have in all OSes, including Linux and MacOS.

Also, the tool comes with source code - so it's possible to re-compile it for other OSes. Not to mention it's made in C# - meaning the windows binary can be run on Linux using Mono. But running it on Windows is still the easiest.

My question: Must this all be done on a Linux OS machine ?

I assume you're asking about writing RootFS. The root filesystem in many embedded devices is constructed using UbiFS file system. UbiFS is not an ordinary filesystem - it uses special functions of NAND and NOR chips which allow additional verification of the data on them. These special functions store additional metadata, outside of the data normally visible to the OS.

To write UbiFS you need a set of tools which are able to properly initialize the additional metadata. I'm not sure is there's such toolset for Windows, but it's definitely easy and straightforward to do on Linux.

Note that you won't have to install Linux on any of your stand-alone computers. The flashing procedure for RootFS doesn't ask you to install Linux on your PC. You will be installing Linux on the DM365 chip, on the Gimbal Top Board. This in normal - the DM365 chip runs Linux. What could be viewed as unnecessary step is writing Recovery Root Filesystem - a smaller, nerfed version of RootFS which you write temporarily only to be able to write the "real" RootFS. Recovery Root Filesystem doesn't use UbiFS, so it can be written without the advanced tools, and used for one-time startup to write the "real" RootFS using tools for UbiFS. There may be other ways to write UbiFS, but this one is probably the easiest.

You will also need a way to transfer files from your PC to the Gimbal Top Board. But again, there are proper tools to do that on all OSes.

To conclude - it doesn't matter that much what will be the OS on your PC. Use the one you're more familiar with.
 
  • Like
Reactions: Mark The Droner
Yes, the Serial Flash Tool from Texas Instruments comes with Windows Command Line build. etc etc .......

Hi Mark,
Wow ... I do have a lot of work ahead of me. I'm an electronics hardware guy, but understand very little of what you just told me. Wish me luck. It's time to learn some new stuff. Many thanks ... Jim
 
Wow ... I do have a lot of work ahead of me. I'm an electronics hardware guy, but understand very little of what you just told me.

Be sure to read this one - it's about remote controller, not gimbal; but they're not that different - same chip you need to flash. And I made it as descriptive as it gets:
 
Hi Mark,
Wow ... I do have a lot of work ahead of me. I'm an electronics hardware guy, but understand very little of what you just told me. Wish me luck. It's time to learn some new stuff. Many thanks ... Jim
Check this thread out:
I bit the bullet (as a hardware man) and did some software on a windows PC (as a mac man) and it worked (-:
 
Check this thread out:
I bit the bullet (as a hardware man) and did some software on a windows PC (as a mac man) and it worked (-:
Thanks for the encouragement. Much appreciated.
 
Be sure to read this one - it's about remote controller, not gimbal; but they're not that different - same chip you need to flash. And I made it as descriptive as it gets:
Great. Thanks for that. Much appreciated.

Edit: Wow ... lots of detail here. So these HDMI add on boards for GL300 RC have the same DM365 chips then ?
 
Last edited:
Check this thread out:
I bit the bullet (as a hardware man) and did some software on a windows PC (as a mac man) and it worked (-:
Certainly will check it out. Many thanks.
 
Be sure to read this one - it's about remote controller, not gimbal; b.....etc

So, I understand for the gimbal I use the Windows Command prompt to write the bootloader to the nand flash using the sfh_DM36x.exe executable.
For all the other programming, am I still in the Windows Command prompt or am I in ExtraPutty console when I type the code below from #5 post for example ?
And is 'dji_fwcon.py' in the code below, some type of executable file or an instruction that DM365 understands directly ?
I don't quite understand.

Code:
./dji_fwcon.py -vvv -x -p P3X_FW_V01.07.0060.bin
openssl des3 -d -k Dji123456 -in P3X_FW_V01.07.0060_m0800.bin -out P3X_FW_V01.07.0060_m0800_decrypted.tar.gz
tar -zxf P3X_FW_V01.07.0060_m0800_decrypted.tar.gz
 
For all the other [than bootloader] programming, am I still in the Windows Command prompt or am I in ExtraPutty console when I type the code below from #5 post for example ?

In the detailed instructions I linked to, after the chapter "Re-flashing bootloader" there is "Re-flashing kernel", which does say you should use ExtraPuTTY.

The overview for re-flashing the whole NAND is:
1. Enter Serial Boot mode (by connecting the BOOT pad)
2. Power up the board, it will start spewing BOOTME on serial
3. Use TI Serial Flashing Host utility to flash bootloader
4. Exit Serial Boot mode (unsolder BOOT pad)
5. Power up the board, it will start the bootloader you just flashed, and enter its shell
6. Use functions of the bootloader to flash: kernel, recovery rootfs (instead of recovery kernel), encrypted partition.
7. Restart the board, and take proper actions to boot it into DaVinci Linux using recovery rootfs
8. Use the UBIFS tools on DaVinci Linux to flash proper root filesystem
9. Reboot, check if Linux is booting properly if you don't take any action during boot (it will get upset at some point because it's not connected to Cypress chip on OFDM Board)
10. Reboot, enter bootloader shell, and overwrite the recovery rootfs with recovery kernel

And is 'dji_fwcon.py' in the code below, some type of executable file or an instruction that DM365 understands directly ?
I don't quite understand.

Right, this is to extract files from the firmware updates from DJI. you don't need any parts of the drone for this, you can do that on any PC. Python is a programming language. The easiest way to learn how to use these tools is to find any "Spark gimbal calibration guide". There are a few videos on that, articles as well. All explain how to install Python interpreter on Windows. (then they show how to run calibration commands, and you will run your commands instead).
 
In the detailed instructions I linked to, after the chapter "Re-flashing bootloader" there is "Re-flashing kernel", which does say you should use ExtraPuTTY.

Sorry about that. You are correct. So much info to take in at once.
D.a.m.n...now I have to learn Python !
My programming experience is with assembly language and Atmel AVR microcontrollers and a bit of C if I have to. I've done years of this, so all this DM36x programming stuff is pretty new to me.
Many thanks for your help. Cheers Jim

Edit:
Right, this is to extract files from the firmware updates from DJI. you don't need any parts of the drone for this, you can do that on any PC. Python is a programming language.

Of course .. DOH...this could be done in C or any language for that matter.
 
Last edited:
@quaddamage:
My nand flash chip order is only a day away, so I'll get one soldered in and see if I can at least get the bootloader programmed and then move on from there. I do have a similar hot air station to yours so wish me luck.
Took a lot of heat to get the old chip off. Hope my machine has enough grunt to do the job. Did you do any pre-heating from underneath the board at all or use a second source of heat from underneath at the same time as the top ?
 
No, nothing like that. The chip came with balls already on it, so I just cleaned the footprint, applied flux, put the chip on, and applied heat from top, keeping tweezers near in case anything moves. When solder melted, I started doing circles with the hot air. Smaller chips do a little "dance" at this point, and that makes the solder stick better; this one was too big for the dance to be observable, though I'm sure it still helped a bit. And that's it.
 
Just make sure that soldering pads are intact. Sometimes a crash, can tear some out of PCB. Corner ones are just for positioning, but majority of center ones are important.
 
Nand chips arrived this morning. Soldered one in, flashed it and success ! Thankyou quaddamage.
Now for the hard stuff !


DM36x initialization passed!
UBL Product Vesion : DJI-GSP-UBL-1.0-rc10(2014-08-15)
Dji UBL Version: 1.51(Aug 15 2014 - 17:05:12)
Booting Catalog Boot Loader
BootMode = NAND
Starting NAND Copy...
Valid magicnum, 0xA1ACED66, found in block 0x00000019.
Uboot Checksum:0x7E25B44B
Actua Checksum:0x7E25B44B

U-Boot Product Vesion : DJI-GSP-Uboot-1.0-rc4(2014-07-23)
U-Boot 2010.12-rc2-svn-Dji (Jul 23 2014 - 11:14:40)
Cores: ARM 432 MHz
DDR: 297 MHz
I2C: ready
DRAM: 128 MiB
NAND: 128 MiB
Bad block table found at page 65472, version 0x01
Bad block table found at page 65408, version 0x01
*** Warning - bad CRC, using default environment

Net: Ethernet PHY: GENERIC @ 0xff
DaVinci-EMAC
Press ESC to abort autoboot in 1 seconds

Loading from nand0, offset 0x4a0000
** Unknown image type
Wrong Image Format for bootm command
ERROR: can't get kernel image!

Loading from nand0, offset 0x900000
** Unknown image type
Wrong Image Format for bootm command
ERROR: can't get kernel image!
Dji-Pro #
 
Last edited:

Recent Posts

Members online

No members online now.

Forum statistics

Threads
143,099
Messages
1,467,634
Members
104,985
Latest member
DonT