Electronics > Microcontrollers

cheapest way to program the Nations N32G455 512KB

(1/2) > >>

Nikan:
Greetings and salutations!

I have a device that uses an N32G455. Unfortunately, its flash got corrupted. I have dumped the flash of a working chip.
What would be the cheapest way to program the N32G455's flash without touching the RAM, registers etc.? (SWD would be very nice)
I have flashed a Nucleo board with an ST-Link to a J-Link just to find out that the ST-J-Link only supports ST chips.
Programming the N32G455 without buying additional hardware would be wonderful.

Any advice is welcome!
Thanks in advance and Best Regards!

mikerj:
The N32G455 is an STM32 clone and as such includes a UART and USB bootloader to allow uploading code via a simple serial link.  Unless there is already a USB interface present on your device the UART bootloader would be much simpler to use, but does depend on the UART and BOOT0/BOOT1 pins being accessible and not connected to circuitry that will interfere with their use.

Nikan:
Exactly. By choosing the STM32G431RB MCU in J-Flash, I was able to dump the entire 512KB of flash from the working and not-working Nations chip. Unfortunately, it is not possible to flash the chip that way; an error always occurs, but it does not specifically indicate the type of error. It is unclear if this is due to the difference in internal flash sizes of the chips or if there is an ID mismatch, etc.

By comparing the dumped files of the good and bad chips, it is clear in the hex editor that the bootloader is partially corrupted as well.

__george__:
J-Link has this chip in their supported list:
https://www.segger.com/supported-devices/nations/n32g4xx

So you should be able to choose the exact chip that you have and maybe have better luck?

openocd has a PR that adds support for this which you can try as well:
https://github.com/openocd-org/openocd/pull/20

But from what you are saying you seem to be using the debugger on the nulceo board to do this?

thm_w:
Someone here hacked the stlink to function as a full unrestricted jlink, but I don't know if the instructions were clear enough to easily reproduce.

Blackmagic probe might work, but usually bluepill board is used for that https://black-magic.org/hacking/target-mm32.html
Other option is buy a jlink edu or a jlink clone.


--- Quote from: __george__ on May 24, 2024, 08:51:48 pm ---J-Link has this chip in their supported list:
https://www.segger.com/supported-devices/nations/n32g4xx

So you should be able to choose the exact chip that you have and maybe have better luck?
--- End quote ---

Can't, as mentioned above, j-link nucleo only allows ST devices.


--- Quote from: Nikan on May 24, 2024, 07:08:40 pm ---Exactly. By choosing the STM32G431RB MCU in J-Flash, I was able to dump the entire 512KB of flash from the working and not-working Nations chip. Unfortunately, it is not possible to flash the chip that way; an error always occurs, but it does not specifically indicate the type of error. It is unclear if this is due to the difference in internal flash sizes of the chips or if there is an ID mismatch, etc.

By comparing the dumped files of the good and bad chips, it is clear in the hex editor that the bootloader is partially corrupted as well.

--- End quote ---

The bootloader mikerj is talking about is in hardware, assuming it exists, it can't be corrupted.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod