-
Notifications
You must be signed in to change notification settings - Fork 39
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
Programming PFS173 fails on the development branch #40
Comments
I I should also note that I am using the "Lite" programmer from here: https://www.eevblog.com/forum/blog/eevblog-1144-padauk-programmer-reverse-engineering/msg3106318/#msg3106318 |
Hmmm, that's interesting. It is working fine on my programmer. I wonder if this is a case where the "lite" version is more sensitive to VPP/VDD than the original? |
I haven't yet tried the development branch on the lite version. Will look into this. The main difference between normal and lite version is that there is no power gating for the boost-converter. Differences could arise if the firmware relies on switching the voltages off via power gating instead of the DACs. I looked at the diffs, but did not find any changes regarding that behavior between master and development branch. Need to set up the toolchain for the firmware first... |
@cmfcmf have you tried any chips other than pfs173? |
Ok, I checked this now. Took a while to fix all the toolchains and versions, as I am using a combination of cygwin and wsl for the build. I should just use my linux box... well...
PFS173
PFS154
@freepdk @serisman any obvious idea how the changes in the development branch could affect the PFS173? |
I only have PFS173 chips :) |
This highly depends on the length of wires from programmer to IC, the connection of IC in socket (maybe some corrosion), wire / additional capacitance on VDD/PA.5, ... On the other hand, when some of the "eval boards" appeared which do have an additional cap on VDD / something connected to PA5, it was needed to "play" with the voltages in order to make them work. I just tested it with PFS173 in socket directly sitting on top of original programmer and everything is working fine. @cmfcmf Thanks for bisect. Only the high voltage should affect the problem you are seeing. Change for PFS173 was: Please describe your hardware setup in full detail (e.g. 150mm jumper wire connected from original programmer to IC socket, holding IC) and try to find a value which is working for you, preferably near to 9.0 (try 8.9, 8.8, 8.7, 8.6). |
I used a PFS173-SO8 in a DIP adapter plugged directly into the programmer. No other things (wires, caps) were connected. I will investigate a bit further. Edit:
Update2:
So you increased the write voltage by 0.5V? |
I changed these lines to their old values:
Now it works perfectly on the lite and the standard version, even with vpp_write_hv=8.0V. |
8V during command phase sounds totally wrong. vdd_cmd difference to vpp_cmd should be at least 2V Original write never uses more than 5 / 5.5V on VPP during command phase. Maybe try to change vdd_write_hv (e.g. on PFS172 5.3V was a magic value). |
But these are actually the exact values from the master branch: easy-pdk-programmer-software/fpdkicdata.c Line 222 in 3a557cc
Confirms the bisect findings from @cmfcmf |
.vdd_cmd_write/.vpp_cmd_write/.vpp_write_hv 4/8/8.5 works So it seems the issue is about the command voltage difference. |
I'm confused. above you said you used ".vdd_cmd_write = 4.0, .vpp_cmd_write = 8.0" I say "vpp_cmd_write = 8V is to high" then you say it is like in master branch but reference vdd_cmd_write ? |
I just linked to the first line of the section in the master branch. (How do you do multi-line links) It reads:
|
@cpldcpu Thanks for the values. VDD cmd = 2.0V is a bit low for STM32 to see them as high r(especially with longer wires). That's why I started with 2.5V But why do you list only 3 values in your table? For write there are 4 voltages: e.g. current dev branch:
changing vdd_write_hv might do the trick |
i kept vdd_write_hv at 5.8V since this was not changed between master and development. |
I checked with real writer again and it looks like on PFS173 indeed VPP_CMD_WRITE starts with a voltage difference of 4V. So my best guess would be to try:
Not sure if we should lower vpp_write_hv to 8.5. |
Yes, those voltages work fine. changiung vpp_write_hv does not seem to have a very big impact. I can go fairly low (e.g. 6.5V) without an issue. I guess the problem was really the voltage difference for entering the programming mode. |
@cmfcmf Please check if the fix also works for you. |
* development: update example binaries Add support for PMS171B (#30) Add like programmer as hardare variant (#41) adapt voltages for PFS173 (fix for issue #40) update year in header fix warnings from gcc-arm set optimization level of libargp to 'Os' to reduce size of binary silence libargp warnings add workaround for MSVC runtime which does not support "%llx" format string fix for issue #39 show baud rate when connected in run mode update year in header Simplify the calibration configuration (#34) Add 'program-dfu' make target for easier uploading of firmware (#37) Fix hwdet for mini-pill hw variant (#36)
I used the same setup as @cpldcpu:
Yes, it works for me! 🎉 |
Describe the bug
Programming a PFS173 does not work with the code from the development branch.
It works fine from the master branch.
To Reproduce
easypdkprog --icname=PFS173 write Examples/helloworld_pfs173.ihx
easypdkprog --runvdd=5.0 start
-> works fine
easypdkprog --icname=PFS173 write Examples/pre-compiled/PFS173/helloworld.ihx
-> error:
Expected behavior
Programming a PFS173 should work without errors.
Desktop (please complete the following information):
Additional context
I also tested my own program compiled with SDCC and it has the same issue: It works with the master branch, but fails with the development branch or #33.
The text was updated successfully, but these errors were encountered: