free-pdk / easy-pdk-programmer-lite-hardware

A version of the easy pdk programmer that can be fully assembled using the JLCPCB assembly service.
Creative Commons Attribution Share Alike 4.0 International
9 stars 3 forks source link

Bad placement when uploading to JLCPCB #1

Open terryspitz opened 1 year ago

terryspitz commented 1 year ago

I tried uploading the Design Files to JLCPCB today and got a layout as shown, assume this needs a fix.

Screenshot 2023-04-12 081651
cpldcpu commented 1 year ago

That happens all the time with the preview at JLCPCB, typically this is corrected during manufacturing data create by them.

terryspitz commented 1 year ago

OK, i'll see if I can create a PR to fix. One more question, https://github.com/free-pdk/easy-pdk-programmer-lite-hardware/blob/master/Design%20Files/Readme.md says "The parts listed in Parts to order at LCSC can not be automatically assembled" but this doesn't seem to be the case: they're in the other csvs/Gerber and appear in the design when uploaded to JLCPCB. Was the intention to remove them for hand soldering? I can see "LCSC Assembly" column blank in some rows of the BOM csv, but this doesn't seem to be removing assembly for those components.

cpldcpu commented 1 year ago

JLCPCB added some parts to their inventory after I ordered the programmer for the last time. I believe now it is possible to have them assemble the USB connector, for example. Impossible to tracke these changes all the time...

terryspitz commented 1 year ago

I've just ordered with the usb, will update here when it comes.

On Mon, 17 Apr 2023, 17:36 Tim, @.***> wrote:

JLCPCB added some parts to their inventory after I ordered the programmer for the last time. I believe now it is possible to have them assemble the USB connector, for example. Impossible to tracke these changes all the time...

— Reply to this email directly, view it on GitHub https://github.com/free-pdk/easy-pdk-programmer-lite-hardware/issues/1#issuecomment-1511713603, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFUZPZHDM65MU2EX44CE4DXBVWPVANCNFSM6AAAAAAW3IUE74 . You are receiving this because you authored the thread.Message ID: @.*** com>

terryspitz commented 1 year ago

I have the parts! I've soldered on the three parts ordered separately from LCSC: the microswitch, the inductor and the oscillator. As you said the USB was able to be fitted by JLCPCB.

I have connect this to my windows PC and am trying and failing to flash the firmware using dfu-utils. I get the following :

C:\Users\terry\Google Drive\EASYPDKPROG\Firmware>dfu-util-0.9-win64\dfu-util.exe -l
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

Found DFU: [0483:df11] ver=2200, devnum=14, cfg=1, intf=0, path="1-2", alt=1, name="@Option Bytes  /0x1FFFF800/01*016 e", serial="FFFFFFFEFFFF"
Found DFU: [0483:df11] ver=2200, devnum=14, cfg=1, intf=0, path="1-2", alt=0, name="@Internal Flash  /0x08000000/064*0002Kg", serial="FFFFFFFEFFFF"
C:\Users\terry\Google Drive\EASYPDKPROG\Firmware>dfu-util-0.9-win64\dfu-util.exe -d 0483:df11 -a "@Internal Flash  /0x08000000/064*0002Kg" --dfuse-address 0x08000000 -D EASYPDKPROG.dfu -v
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

DFU suffix version 100
Opening DFU capable USB device...
ID 0483:df11
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuERROR, status = 10
dfuERROR, clearing status
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Internal Flash  "
Memory segment at 0x08000000  64 x 2048 = 131072 (rew)
Downloading to address = 0x08000000, size = 33664
Download        [                         ]   0%            0 bytes   Poll timeout 40 ms
   Poll timeout 40 ms
   Poll timeout 40 ms
   Poll timeout 40 ms
   Poll timeout 40 ms
   Poll timeout 40 ms
   Poll timeout 40 ms
...

with the timeout continuing indefinitely, and the Download staying at 0%. No LEDs light at any point.

I've tried the various Windows USB drivers as offered by Zadig - no difference. I've tried connecting to the board without the inductor or oscillator (to see if my soldering is at fault) - no difference (same diagnostics as above). Not sure if this is as expected.

Any suggestions to debug further?

thanks

PXL_20230506_103125148 PXL_20230502_195637806 PXL_20230506_103131517

terryspitz commented 1 year ago

Tried it on my friends Mac... uploading firmware works!!

Pauls-MacBook-Pro-3:dfu paulfreedman$ dfu-util -d 0483:df11 -a "@Internal Flash  /0x08000000/064*0002Kg" --dfuse-address 0x08000000 -D EASYPDKPROG.dfu
dfu-util 0.11

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

Opening DFU capable USB device...
Device ID 0483:df11
Device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(10) = dfuERROR, status(10) = Device's firmware is corrupt. It cannot return to run-time (non-DFU) operations
Clearing status
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Internal Flash  "
Downloading element to address = 0x08000000, size = 33664
Erase       [=========================] 100%        33664 bytes
Erase    done.
Download    [=========================] 100%        33664 bytes
Download done.
File downloaded successfully

so looking for thoughts on issue with Windows (usb?) installing via dfu-util.

cpldcpu commented 1 year ago

It looks like some kind of stability issue, as the device is correctly indentified and enters DFU mode. Tough to tell what it is. Sometimes there are issues depening on controller or hub. Try different USB ports, try to find ports that are not shared with other devices.

terryspitz commented 1 year ago

Update: I managed to order min. quantity 5 of these from JLCPCB for £28, including the USB socket, but excluding the microswitch, crystal and inductor which I got from LCSC and soldered myself. They work for programming an on-circuit PFS154 SO8, but don't calibrate successfully (I didn't realise I needed to expose PA4 pin), so this functionality isn't tested.

With other parts, shipping & duty (to post-Brexit UK) I'm willing to sell the extras at cost: £12/$15/€14 plus shipping to your location.