sipeed / TangNano-9K-example

TangNano-9K-example project
196 stars 62 forks source link

[picotiny] Flashing got stuck at `Flashing 1/3`. #14

Open hfwang132 opened 1 year ago

hfwang132 commented 1 year ago

Hello, I am new to Tang Nano and I would like to try some examples on it.

I have followed every step in https://wiki.sipeed.com/hardware/zh/tang/Tang-Nano-9K/examples/picorv.html. And when I tried to download the firmware onto the flash, the program got stuck at Flashing 1/3

(base) PS D:\Gowin\gowin_prj\TangNano-9K-example-main\TangNano-9K-example-main\picotiny> python .\sw\pico-programmer.py .\example-fw-flash.v COM19
Read program with 11760 bytes
- Waiting for reset -                                                                                                     
...
Total sectors 3                                                                                                         
Total pages 46                                                                                                          
Flashing 1 / 3                                                                                                             

After two hours or so, I terminated the program by sending Ctrl+C and the output was:

Traceback (most recent call last):
File "D:\Gowin\gowin_prj\TangNano-9K-example-main\TangNano-9K-example-main\picotiny\sw\pico-programmer.py", line 169, in <module>                                                                                                                 
isp_exec_esec(ser, curraddr)                                                                                          
File "D:\Gowin\gowin_prj\TangNano-9K-example-main\TangNano-9K-example-main\picotiny\sw\pico-programmer.py", line 31, in isp_exec_esec                                                                                                             
isp_wait_byte(ser, 0x32)                                                                                              
File "D:\Gowin\gowin_prj\TangNano-9K-example-main\TangNano-9K-example-main\picotiny\sw\pico-programmer.py", line 15, in isp_wait_byte                                                                                                             
resp = ser.read()                                                                                                     
File "D:\Program_Files\Anaconda\lib\site-packages\serial\serialwin32.py", line 288, in read                               
result_ok = win32.GetOverlappedResult(                                                                              
KeyboardInterrupt

It seemed that it was stuck at isp_wait_byte().

If someone could give a light on this, I would appreciate it.

dashxdr commented 6 months ago

I'm using linux but maybe under windows the COM19 might be configured for hardware flow control? I think you do not want that.

Another issue is if you have a terminal window open on the same COM port maybe the two processes are competing for data? Not sure if windows lets you do that though. Finally, the flash programming is done over the 2nd serial port, not the 1st one.