Skip to content

Cannot flash Tang Primer 20K #573

@edofullin

Description

@edofullin

Hi everyone, I just got a Tang Primer 20K (with devboard) to play with LiteX. While the official Gowin tools can program the flash correctly, they are a pain to use as they unload the ftdi driver, killing the UART port in the process.

OpenFPGAloader has issues programming the flash, as it seems to hang dusring the programming process. I am using version 0.13.1 from my distro. This does not always happen, it seems smaller bitstream can be flashed correctly.

I am not sure if it can be related to #572, as the detect part works for me. Thank you in advance and let me know if I need to do further debugging.

edoardo@edoardo-fedora:~$ openFPGALoader --verbose-level 2 --cable ft2232 --write-flash --bitstream /home/edoardo/Code/litex/linux-on-litex-vexriscv/build/sipeed_tang_primer_20k/gateware/sipeed_tang_primer_20k.fs
empty
write to flash
Jtag frequency : requested 6.00MHz   -> real 6.00MHz  
Raw IDCODE:
- 0 -> 0x0000081b
- 1 -> 0xffffffff
Fetched TDI, end-of-chain
found 1 devices
index 0:
	idcode 0x81b
	manufacturer Gowin
	family GW2A
	model  GW2A(R)-18(C)
	irlength 8
File type : fs
Parse file Parse /home/edoardo/Code/litex/linux-on-litex-vexriscv/build/sipeed_tang_primer_20k/gateware/sipeed_tang_primer_20k.fs: 
checksum 0xbd96
Done
DONE
bitstream header infos
CRCCheck: ON
Compress: OFF
ConfDataLength: 2110
LoadingRate: 2500000
ProgramDoneBypass: OFF
SPIAddr: 00000000
SecurityBit: ON
idcode: 0000081b
after program flash: displayReadReg 00006020
	Memory Erase
	Done Final
	Security Final
Erase SRAM before erase sram: displayReadReg 00006020
	Memory Erase
	Done Final
	Security Final
pollFlag: 60a0 (80)
pollFlag: 4080 (0)
pollFlag: 4080 (0)
pollFlag: 4080 (0)
pollFlag: 4080 (0)
pollFlag: 4080 (0)
pollFlag: a0 (20)
after erase sram: displayReadReg 000000a0
	Memory Erase
	System Edit Mode
pollFlag: 20 (0)
after erase sram: displayReadReg 00000020
	Memory Erase
DONE
Jtag probe limited to %d MHz6000000
Jtag frequency : requested 10.00MHz  -> real 6.00MHz  
b 0 17 b read b00170b
Detail: 
Jedec ID          : 0b
memory type       : 00
memory capacity   : 17
b 40 17 b read b40170b
Detail: 
Jedec ID          : 0b
memory type       : 40
memory capacity   : 17
RDSR : 0x00
WIP  : 0
WEL  : 0
BP   : 0
TB   : 0
SRWD : 0
RDSR : 0x00
WIP  : 0
WEL  : 0
BP   : 0
TB   : 0
SRWD : 0
flash chip unknown: use basic protection detection
start addr: 00000000, end_addr: 000e0000
Erasing: [==================================================] 100.00%
Done
Writing: [===============                                   ] 28.16%Error: ftdi_read_data in mpsse_readError: ftdi_read_data in mpsse_read

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions