free-pdk / easy-pdk-programmer-software

Easy PDK programmer for PADAUK microcontroller
https://free-pdk.github.io/
GNU General Public License v3.0
112 stars 37 forks source link

PFS172 support #7

Closed spth closed 4 years ago

spth commented 5 years ago

Padauk just released the PFS172, a pdk14 flash µC. It would be good to have support for it.

freepdk commented 5 years ago

Support can be added only, if a real physical device is available. It is not possible to add support for data sheet only CPUs.

spth commented 5 years ago

Historically, Padauk released datasheets and devices very close in time. So I would except availability of the device at distributors within few weeks.

spth commented 4 years ago

For my work on SDCC and the f-eval boards, I consider this the most important open feature request. ICs are on the way.

spth commented 4 years ago

I do not know how much is supposed to work already in the pfs17 branch, but: I tried the branch with a PFS172 today. easypdkprog probe works for me. easypdkprog write says:

Erasing IC... done.
FPDK_ERROR: chip is not blank

I tried two different PFS172 chips.

freepdk commented 4 years ago

Hi,

this feature branch is not complete yet since the normal programing method does not work (VDD requires >8V for erase/write to work reliable).

Now looking at the "limited voltage programing mode". Just takes some time.

freepdk commented 4 years ago

You can try the PFS172 branch now. Read / write works perfectly. Erase is having some glitches which I fixed in a very crude way for now (erase works, but not like the original WRITER is doing it).

EDIT: Write is not working completely yet.

After first attempt you might get "verify failed". You can still try to program by running (multiple times) the following command afterwards. Eventually all bits will flip and verify succeeds.

./easypdkprog --icname=PFS172 write test.hex --noerase --noblankchk

spth commented 4 years ago

The pfs172 branch works for me. I tested with both PFS172 and PFS154. Thanks.

I've programmed the PFS172 about 10 times and so far did not see a "verify failed".

freepdk commented 4 years ago

It happened to me when I tried to write a bigger program (>80% used).

spth commented 4 years ago

I see. I tried only smaller programs meant for https://github.com/free-pdk/sdcc-pdk-code-examples so far.

cpldcpu commented 4 years ago

What should be limiting is the number of zero bits that are written at a time. Maybe it helps to write nibbles instead of bytes? Or make this adaptive, so that a maximum of 4 zeros is written at any time?

freepdk commented 4 years ago

Right now no limiting at all is implemented. Just the reduced voltage.

This works ok if you write only first 25% of IC.

So maybe just a small pause after every 4 word group might be enough.

I will do some experiments later.

freepdk commented 4 years ago

Adding PFS172 support is finished and available in development branch right now