Tang-Nano-Doc icon indicating copy to clipboard operation
Tang-Nano-Doc copied to clipboard

Not flashing device

Open NicolaGiardino opened this issue 3 years ago • 5 comments

I tried flashing the example led project on my tang nano's SRAM. It worked. Then I flashed it using embFlash, and it stopped working, now I get this output

:
Info:	"embFlash Erase,Program" starting on device-1...
Warn:	Unknown Cable
Warn:	Unknown Cable
Info:	Status Code: 0x00019020
Error:	Finished, NOT wakes up
Info:	User Code: 0x00000000
Info:	Finished!
Info:	Cost 5.27 second(s)
:	 

NicolaGiardino avatar Apr 27 '21 10:04 NicolaGiardino

Just got my two Tang Nanos yesterday and also tried the embFlash on one of them only for it to lock up and give this output. I assume flasing the embFlash would be the way to store the program in non-volatile memory. The documentation is not very helpful on this matter, so let me know if you find a solution.

peterkrull avatar Apr 29 '21 15:04 peterkrull

Yes, that's what it means. The problem is that it always fails to program the onboard flash, it only works to flash the SRAM

NicolaGiardino avatar Apr 29 '21 21:04 NicolaGiardino

Hi, I have the same problem, but with a different status code. I am able to program the SRAM but not the flash.

 "embFlash Erase,Program" starting on device-1...
 Unknown Cable
 Unknown Cable
Programming...: [#########################] 100%
 Status Code: 0x00015421

Error: Finished, NOT wakes up
 User Code: 0x00000000
 Finished!
 Cost 10.61 second(s)

Using openFPGALoader I get some description for the status code:

displayReadReg 00015421
        CRC Error
        Memory Erase
        Non-jtag is active
        Gowin VLD
        Security Final
        POR

And after the erroneous flash programming, the device will mostly refuse to work. Not sure how, but at some point, after a few attempts to program the SRAM it reset the status code to a friendly:

Status Code: 0x0001F020

towoe avatar Sep 21 '21 03:09 towoe

I am not sure if this was just a fluke or if it works this way. Using the programmer that comes with Gowin 1.9.8 I was able to setup the cable to 15MHz (from a default of 2MHz). That made programming the flash work (I tried three different projects and they all stuck). I tried 2.5MHz like I saw mentioned in another post, but that was unsuccessful. Maybe the data needs to come in at a certain rate so it is always ready for the flash programmer?

AntonioDrusin avatar Dec 28 '21 12:12 AntonioDrusin

A link to the post that mentioned trying 2.5Mhz cable speed https://lirc572.com/2019/12/23/sipeed-tang-nano-development-environment-setup/

AntonioDrusin avatar Dec 28 '21 12:12 AntonioDrusin