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
PMS150G support #16
Comments
The device seems to be available in shops now: |
Another shop that has the PMS150G: |
A week ago, Padauk updated the PMS150G datasheet, which now also lists the PMS15B. Apparently, the PMS15B is an otherwise identical variant of the PMS150G with only half the program memory (similar to PMS15A vs. PMS150C). |
@freepdk Are you still working on this? I might be able to provide some of these MCUs for free(e.g. PMS150G, PMS131, etc) if that helps with the development. |
I had a quick look at the include file from PADAUK IDE and it looks like PMS150G is in many ways identical to PMS150C. In order to add support I would need the real IC-ID which you can find out by running
output should be something like this:
Can you please try this and report the value of RSP (response) for PMS150G ? |
Sure, I'll order them. They should arrive after the lunar new year holiday. |
Also, Spth mentioned that
What's the highest VDD voltage FreePDK programmer v1.2 can deliver? Or do we also need to have a programmer revision? |
This are just values from data sheet mentioning what could happen when the original WRITER is used... we will see reality. VPP ==> max easy pdk programer can do is ~ 13.0 V In case we really need 2 voltages >7.5V then we could just change "R6" on pcb to change the opamp curve. |
I just received these ICs. Here's the probe information:
Underneath the IC the first line reads:
This indicates that it's probably a completely new IC. |
Ok, Based on this the ICID 12 bit is 0x639 You could try to add the following block to "fpdkicdata.c" (e.g. right after the PMS150C):
This will let Now you can try to read the IC If the read does not work try to change .type to FPDK_IC_OTP2_2. NOTE: All voltages are just copied from PMS150C. |
Here's the bin file. |
The readout look good :-) Thanks for this. WRITER usually is doing:
So when you capture the complete process (some seconds only) we will see multiple different voltages. The voltage trace for VDD/VPP should have a resolution of at least 100 samples / second (higher is better). Since reading is working already, we only need to see the voltages for the write command:
They can be identified easily in power trace (VPP/VDD in high voltage phase are the highest voltages of complete programing cycle) |
Here's the PulseView file I captured with two probes under 10x mode. From the capture, I saw that the highest voltage VDD went was 850mV(with a 10x probe). |
Somehow the capture does not look right. Also when I open your attached file in pulseview it shows a different capture than your screen shot. The attached .sr file shows a negative voltage on VDD channel when idle. Could it be that you did not connect GND of VDD channel properly? The write cycle from SR file shows VDD cmd write 3.0V suggested values to try
Then try to write a file In case you run into a verification error, you can try again to program the same IC. You only have to disbale "blank check": Sometimes write needs more current / higher voltage to flip all required bits. Nevertheless a second pass usually flips the remaining bits and the IC is still usable. |
This is what I got. After this unsuccessful write, the dumped bin looks identical to the empty one. |
The error message says that after starting the write command the IC did not respond with the proper ICID. Please try to use " FPDK_IC_OTP2_2" in icdata for PMS150G maybe this fixes the problem already. If not then the write command maybe different and we need a complete capture of a write with logic analyzer (usually I use 5 MHz for this). |
Here is a CLK and DAT capture of the prog sequence. If I connect the probe's ground to the programmer's ground, the programmer will throw an error. So I connected my probe's ground to the programmer's USB connector shell. |
Any update on this topic? |
I had a look at your capture, unfortunately it is incomplete. PMS150C / G? uses more pins: CLK/DATOUT/DATIN/(CLK2?) You should connect all 8 programing from WRITER to your logic analyzer (you can find the 8 pins when you open the back of WRITER, this is a convenient way to connect). Also make sure to use the digital GROUND from WRITER (I soldered an extra pin on back for this). !!! make sure that your logic analyzer can handle >5V when you connect VPP/VDD !!! |
PMS150G_16Mhz_8CH.zip |
However, If I connect my probe to IC's signal ground, WRITER will throw an open circuit error. To compensate for that, I increased the sample rate to 16Mhz |
May I see your extra digital ground pin? |
@LovelyA72 There you can see the back of the WRITER (when you open the service door). Between CN40 and CN39 is an empty looking area. I soldered an extra pin header pin to one of the 2 GND pins (big solder blob and stick a pin inside). |
The readout is still not optimal (looks like your logic analyzer does not show VDD / VPP properly ... maybe your threshold level is not optimal / to high (on my logic analyzer I set >2V = logical 1). However I could identify I clearly could see: => addressbits = 12 WRITE command with trailer is A5A5A5A7 => this command is used for write by FPDK_IC_OTP1_2 => write_block_size = 2 What I could not see was the direct response to the READ or WRITE command (the thing what easypdk programmer is complaining is not matching for write). The protocol itself looks to be identical with the PMS150C protocol. So things to try is to "play" with the voltages for the write command. Either you can read the real voltage values during a write or you just try: First only play with the CMD voltages. The IC expects a voltage difference > 2.0 V between VDD and VPP.
e.g. VDD 4.5 VPP 8.5 You found a working pair as soon as you do not get the "FPDK_ERROR: command ack failed / wrong icid" anymore. After that write might be working or not... maybe also needs to play with hv voltage... |
Is it possible to add a cli argument that specify the vdd and vpp? That will be an awesome feature for testing out new ics |
BTW, one more information: |
update regarding the writer
{ .name = "PMS150G",
.otpid = 0x2539,
.id12bit = 0x639,
.type = FPDK_IC_OTP1_2,
.addressbits = 12,
.codebits = 13,
.codewords = 0x400,
.ramsize = 0x40,
.exclude_code_start = 0x3F6,
.exclude_code_end = 0x400,
.vdd_cmd_read = 2.5,
.vpp_cmd_read = 5.5,
.vdd_read_hv = 2.5,
.vpp_read_hv = 5.5,
.vdd_cmd_write = 4.5,
.vpp_cmd_write = 8.0,
.vdd_write_hv = 6.5,
.vpp_write_hv = 8.0,
.write_block_size = 2,
.write_block_clock_groups = 1,
.write_block_clocks_per_group = 8,
}, |
But when I power up the micro, the LED just constantly stays lit. I think a clock calibration might help. |
Also, without the |
@Kashouryo
Since your PMS150G has an extra factory value @0x3f5 you should exclude this word as well
It looks like the write was not 100% successful (some bits have not been written properly) Usually this is caused by to low vpp_write_hv ==> I suggest you set it a bit higher... (9V or 10V) Edit: It looks like just a single bit in the very first written word was not flipped. So you are very close to a 100% good writing.
This is most likely caused by the write not complete (verify failed). See above. |
Nope, doesn't work. With 10.5V VPP and 6.6V VDD and multiple writes, the IC still doesn't verify or run. |
Alright, I edited the code to skip the verification
|
@Kashouryo However if verify fails (like in your case) most likely calibration can not be performed since some bits of the program memory are written incorrectly. Calibration needs the injected calibration code to run correctly. The problem is not that "the programmer can not verify the IC". The problem is that the IC was not written correctly! Like I said before... Try to play with the voltages. I suggested to not only play with "VPP_write_hv" instead it is more likely that you might be successful when you increase "VDD_cmd_write". Best way would still be to measure the real voltages (with correct ground reference) when original WRITER is performing the write. then you would not have to try so hard... |
I use Padauk writer. @0068 1700 // MOV A, 0x00 May it VPP voltage right. |
Finally I got hold of some PMS150G. I have writing + reading working reliable. What you observed is correct. It is a new "feature". => It looks like the first 32 instructions are scrambled, this repeats every 64 instructions. The scrambler is a simple substitution cipher (bits are shuffeled around). I already have a full mapping and can scramble and unscramble this data @padauk: You really love 55AA right ? :-) Full PMS150G support is not far away. |
{ .name = "PMS150G", |
I just measured the voltages WRITER uses and everything worked at the first try (even reading the first address is working).
=> REMEMBER Due to the new instruction block scrambling you can not write a working program right now. I still need to add some extra code to scramble (before writing) and descramble (after reading) the scrambled instructions blocks. |
Looks like this scrambler which scrambles 32 instructions, skips 32 instructions, scrambles 32 instructions, ... will cause problems with our calibration since we can not "overwrite" the 0xFF initial value with the final tuning value, in case the calibration routine is located inside of a scrambled region. Therefore I will need to add some extra stuff (in the pms150g header file) so calibration routines are always located in unscrambled areas. EDIT: After I fully understood the scrambling, I found that this will not be a problem at all. |
And it seems to work:
I will cleanup and prepare update of development branch... should be there soon |
Closing this one. PMS150G was added in c1ff506 |
Today, Padauk released version 0.00 of the PMS150G datasheet.
Since this device seems to be another low-end device, very similar to the PMS150C, it wil probably become quite popular; so it would be good to have support. I guess it will take a few more weeks until devices arrive at distributors though.
From the datasheet, the PMS150G is nearly identical to the PMS150C.
Differences:
The text was updated successfully, but these errors were encountered: