Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GFMPW-1 read compare FAILED #111

Open
gonsolo opened this issue Sep 9, 2024 · 1 comment
Open

GFMPW-1 read compare FAILED #111

gonsolo opened this issue Sep 9, 2024 · 1 comment

Comments

@gonsolo
Copy link

gonsolo commented Sep 9, 2024

I try to test my GFMPW-1 chip that I received last week.

Connecting the board via USB results in the following dmesg (with a harmless warning, I believe):

[ 9. Sep 11:55] usb 5-1: new high-speed USB device number 3 using xhci_hcd
[  +0,142033] usb 5-1: New USB device found, idVendor=0403, idProduct=6014, bcdDevice= 9.00
[  +0,000007] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  +0,000005] usb 5-1: Product: Single RS232-HS
[  +0,000003] usb 5-1: Manufacturer: FTDI
[  +0,000902] ftdi_sio 5-1:1.0: FTDI USB Serial Device converter detected
[  +0,000046] usb 5-1: Detected FT232H
[  +0,001524] usb 5-1: FTDI USB Serial Device converter now attached to ttyUSB0
[ +46,767251] usb 5-1: usbfs: interface 0 claimed by ftdi_sio while 'python3' sets config #1
[  +0,003442] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[  +0,000020] ftdi_sio 5-1:1.0: device disconnected
[ 9. Sep 11:56] ftdi_sio 5-1:1.0: FTDI USB Serial Device converter detected
[  +0,000060] usb 5-1: Detected FT232H
[  +0,001425] usb 5-1: FTDI USB Serial Device converter now attached to ttyUSB0

Building the firmware via make clean hex in chipignite/blink works, I had to adjust the Makefile to:

TOOLCHAIN_PATH=/home/gonsolo/bin/
TOOLCHAIN_PREFIX=riscv64-unknown-linux-gnu
ARCH=rv32i_zicsr

But flashing the chip fails with:

gonsolo blink:sudo make flash
python3 ../util/caravel_hkflash.py blink.hex
Success: Found one matching FTDI device at ftdi://ftdi:232h:5:3/1
Caravel data:
   mfg        = 0456
   product    = 20
   project ID = 1801a030
 
Resetting Flash...
status = 0x00
JEDEC = ef4016
Erasing chip...
..............................done
status = 0x00
setting address to 0x0
addr 0x0: flash page write successful
addr 0x100: flash page write successful
addr 0x200: flash page write successful
addr 0x300: flash page write successful
addr 0x400: flash page write successful
addr 0x500: flash page write successful
addr 0x600: flash page write successful
addr 0x700: flash page write successful
addr 0x800: flash page write successful
addr 0x900: flash page write successful
addr 0xa00: flash page write successful
addr 0xb00: flash page write successful
addr 0xc00: flash page write successful
addr 0xd00: flash page write successful
addr 0xe00: flash page write successful
setting address to 0xf00
addr 0xf00: flash page write successful
setting address to 0x1000
addr 0x1000: flash page write successful
setting address to 0x1024
addr 0x1024: flash page write successful
setting address to 0x1048
addr 0x1048: flash page write successful
setting address to 0x10d8
addr 0x10d8: flash page write successful
setting address to 0x1114
addr 0x1114: flash page write successful
setting address to 0x1154
addr 0x1154: flash page write successful
addr 0x1254: flash page write successful
addr 0x1354: flash page write successful
setting address to 0x13ec
addr 0x13ec: flash page write successful
setting address to 0x1478
addr 0x1478: flash page write successful
setting address to 0x14cc
addr 0x14cc: flash page write successful
setting address to 0x154c
addr 0x154c: flash page write successful
setting address to 0x156c
addr 0x156c: flash page write successful

total_bytes = 5486
status reg_1 = 0x0
status reg_2 = 0x2
************************************
verifying...
************************************
status reg_1 = 0x0
status reg_2 = 0x2
setting address to 0x0
addr 0x0: read compare successful
addr 0x100: read compare successful
addr 0x200: read compare successful
addr 0x300: read compare successful
addr 0x400: read compare successful
addr 0x500: read compare successful
addr 0x600: read compare successful
addr 0x700: read compare successful
addr 0x800: read compare successful
addr 0x900: read compare successful
addr 0xa00: read compare successful
addr 0xb00: read compare successful
addr 0xc00: read compare successful
addr 0xd00: read compare successful
addr 0xe00: read compare successful
setting address to 0xf00
addr 0xf00: read compare successful
setting address to 0x1000
addr 0x1000: *** read compare FAILED ***
b'2f6c69622f6c642d6c696e75782d726973637633322d696c7033322e736f2e3100'
<----->
b'0f646060246044206c6900556020726100637633322d696c7033322e736f2e3100'
setting address to 0x1024
addr 0x1024: read compare successful
setting address to 0x1048
addr 0x1048: read compare successful
setting address to 0x10d8
addr 0x10d8: *** read compare FAILED ***
b'005f6664617461005f65627373005f66737461636b00747261705f656e747279005f6564617461005f66646174615f726f6d005f6662737300'
<----->
b'005f6664617461005f65627373005f66737461636b00747261705f656e747279005f65646174610044c80c0210440e0024000000b80000000c'
setting address to 0x1114
addr 0x1114: *** read compare FAILED ***
b'030000000200000002000000060000001820a42809220200020000000600000007000000c45de7ec702aef0e4245d5ecd3b6ef0e71ab5ea9e0a0ec8a4d3f4a01'
<----->
b'0000000000000000000000000200000000008000080002000000000004000000000000000050e7ec20000000004404004080010800000c080000c000480c0200'
setting address to 0x1154
addr 0x1154: *** read compare FAILED ***
b'1000000000000000037a5200017c01011b0c02002400000018000000b8efffff2400000000440e104881018802440c080048c144c80c0210440e00002400000040000000b4efffff2400000000440e104881018802440c080048c144c80c0210440e00002400000068000000b0efffff3000000000440e204881018802440c080054c144c80c0220440e00002400000090000000b8efffff7c00000000440e104881018802440c08000260c144c80c0210440e0024000000b80000000cf0ffff2400000000440e104881018802440c080048c144c80c0210440e000024000000e000000008f0ffff2400000000440e104881018802440c080048c144c80c0210'
<----->
b'1000000000000000037a5200017c01011b0c02002400000018000000b8efffff2400000000440e104881018802440c080048c144c80c0210440e00002400000040000000b4efffff2400000000440e104881018802440c080048c144c80c0210440e00002400000068000000b0efffff3000000000440e204881018802440c080054c144c80c0220440e00002400000090000000b8efffff7c00000000440e104881018802440c08000260c1ac010000f0f4ffffb801000000440e204881018802440c0800039c01c144c80c0220440e0000000024000000d80100007cf6ffff2400000000440e104881018802440c080048c144c80c0210440e000024000000'
addr 0x1254: *** read compare FAILED ***
b'440e0000240000000801000004f0ffff6800000000440e204881018802440c0800024cc144c80c0220440e00240000003001000044f0ffff5400000000440e204881018802440c080078c144c80c0220440e0000240000005801000070f0ffff8800000000440e304881018802440c0800026cc144c80c0230440e002800000080010000d0f0ffff4c04000000440e204881018802440c0800033004c144c80c0220440e0000000028000000ac010000f0f4ffffb801000000440e204881018802440c0800039c01c144c80c0220440e0000000024000000d80100007cf6ffff2400000000440e104881018802440c080048c144c80c0210440e000024000000'
<----->
b'440e0000240000000801000004f0ffff6800000000440e204881018802440c0800024cc144c80c0220440e00240000003001000044f0ffff5400000000440e204881018802440c080078c144c80c0220440e0000240000005801000070f0ffff8800000000440e304881018802440c0800026cc144c80c0230440e002800000080010000d0f0ffff4c04000000440e204881018802440c0800033004c144c80c0220440e000000002800000060edffffa4fdffff84edffffccfdffffb4edfffff4fdffff30eeffff1cfeffff54eeffff44feffff78eeffff6cfeffffe0eeffff94feffff34efffffbcfeffffbcefffffe4feffff08f4ffff10ffffffc0f5ffff'
addr 0x1354: *** read compare FAILED ***
b'0002000078f6ffff2400000000440e104881018802440c080048c144c80c0210440e0000280000002802000074f6ffff2c03000000440e104881018802440c0800031003c144c80c0210440e00000000240000005402000074f9ffff8800000000440e204881018802440c0800026cc144c80c0220440e001c0000007c020000d4f9ffff4401000000440e104881018802440c0800000000'
<----->
b'0002000060f4ffff2400000000440e100881018800400c080048c14488080210400e0000280000002802000074f6ffff2c03000000440e104881018802440c0800031003c144c80c0210440e00000000240000005402000074f9ffff8800000000440e204881018802440c0800026cc144c80c0220440e001c0000007c020000d4f9ffff4401000000440e104881018802440c0800000000'
setting address to 0x13ec
addr 0x13ec: *** read compare FAILED ***
b'011b033b64fdffff100000003cedffff7cfdffff60edffffa4fdffff84edffffccfdffffb4edfffff4fdffff30eeffff1cfeffff54eeffff44feffff78eeffff6cfeffffe0eeffff94feffff34efffffbcfeffffbcefffffe4feffff08f4ffff10ffffffc0f5ffff3cffffffe4f5ffff64ffffff08f6ffff8cffffff34f9ffffb8ffffffbcf9ffffe0ffffff'
<----->
b'011b033b64fdffff100000003cedffff7cfdffff781400100800000054000000090000000c000000fbffff6f00000008f9ffff6f0700000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'
setting address to 0x1478
addr 0x1478: read compare successful
setting address to 0x14cc
addr 0x14cc: *** read compare FAILED ***
b'f5feff6f1411001005000000d810001006000000481000100a000000390000000b00000010000000150000000000000007000000781400100800000054000000090000000c000000fbffff6f00000008f9ffff6f0700000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
<----->
b'f5feff6f1411001005000000d810001006000000481000100a000000390000000b00000010000000150000000000000007000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'
setting address to 0x154c
addr 0x154c: read compare successful
setting address to 0x156c
addr 0x156c: read compare successful

total_bytes = 5486
pll_trim = b'ffefff03'

Any idea what went wrong?

@gonsolo
Copy link
Author

gonsolo commented Sep 9, 2024

After playing around with it for a while nothing works anymore:

Success: Found one matching FTDI device at ftdi://ftdi:232h:5:3/1
Caravel data:
   mfg        = 0000
   product    = 00
   project ID = 00000000
Incorrect MFG value, expected 0x0456.

What's wrong now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant