free-pdk / easy-pdk-programmer-software

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

Integrating the PFS132 #71

Open edben22 opened 1 year ago

edben22 commented 1 year ago

HI every one!!! To integrate the PFS132 I have added the following structure to the fpdkicdata.c file (Basically by copying and pasting the structure of PSF172, just update the id12bit and assign a random value to the optid).

With this, the commands ./easypdkprog probe and ./easypdkprog -n PFS132 read /.../file.hex works but the commands ./easypdkprog -n PFS132 erase and ./easypdkprog -n PFS132 write ... no works.

I imagine that the write and erase commands do not work because of some incorrect values in the structure that do not correspond to PFS132, maybe VCC, VPP, ....

Please could you share with me suggestions on how to determine the correct values of the PFS132 structure?

{ .name = "PFS132", //ok .otpid = 0x8C39, .id12bit = 0x764,//ok .type = FPDK_IC_FLASH, //ok .addressbits = 13, .codebits = 14,// ok .codewords = 0x800, //ok .ramsize = 0x80, //ok .exclude_code_start = 0x7E0, //ok OTP area 16 words, contains empty space for user and BGTR IHRCR factory values .exclude_code_end = 0x7F0, //ok // .command_trailing_clocks = 1, // .calibration_loop_cycle_correction = 2, .cmd_read = 0xC, .vdd_cmd_read = 2.5, .vpp_cmd_read = 5.5, .vdd_read_hv = 2.5, .vpp_read_hv = 0.0,//0.0, -> .cmd_write = 0x7, .vdd_cmd_write = 2.5, .vpp_cmd_write = 5.5, .vdd_write_hv = 4.8,//4.8, -> .vpp_write_hv = 0.0, .write_block_address_first = 1, .write_block_size = 4, .write_block_limited = 1, .write_block_clock_groups = 2,//2 -> .write_block_clock_group_lead_clocks = 1, .write_block_clock_group_slow_clocks = 4,//4 ->
.write_block_clock_group_slow_clock_hcycle = 30,//30 -> .write_block_clock_group_trail_clocks = 4,//4, -> .cmd_erase = 0x5,//0x5, .vdd_cmd_erase = 2.5,//2.5, -> .vpp_cmd_erase = 5.5,//5.5, -> .vdd_erase_hv = 4.8,//4.8, -> .vpp_erase_hv = 0.0,//0.0, -> .erase_clocks = 12// 2 (not sure why we need so many clocks) .erase_clock_hcycle = 20000, //20000 },

spth commented 8 months ago

If you have access to the original Padauk programmer (where are you located?), use an oscilloscope to see what happens when programming the PFS132?