Your programmer uses many different component, so it also does not have a very optimized BOM for production.
Yes, this programmer has a quite different approach. It is intended to feed VCC to a board, which may consume more current than the PIC itself would need. Also it is intended to set the voltage on VCC to values from approx. 2 volts to nearly 7 volts from the supply via USB and maintains the logic levels according to this span. That's probably a bigger gun than required for programming a Padauk controller.
But there are some details in the hardware, I would like to point on: the setup of the voltages is separated from the switches, it needs only a usual PWM and it is limited by the choosen values of the resistors, so no fault can occure if the software fails to limit it to the bounds given by the manufacturer.
My problems with the easypdkprog are software problems, in particular the lacking definitions of the protocol between PC and programmer on the USB. I use to start any development by writing down the interface and protocol between different parts (like PC software and µC firmware), so the whole development can be divided into smaller parts and can be written separately.
And I love to split down the necessary functions of the programmers firmware to atomic ones, so the algorithms can be left on the PC side without making the whole procedere clumsy. If there is an interest in this, I can post it here.
Ok, I had the audacity to create a preliminary "lite"-Version of the easypdkprogrammer, based on "Basic" components from the JLCPCB catalogues.
Is this lite programmer mechanically compatible (i.e. will it fit into the same case as the normal programmer)?
The main problem I see for assembly is the USB connector. Replacing it with a through-hole part, while breaking mechanical compability, would make it easier to hand-solder (as JLCPCB does not solder connectors).
P.S.: Why not just put the design into free-pdk git, as an alternative programmer, to make it easier for people to have a closer look (and github issues might be better for discussion of individual features than this forum thread). We already have 10 repos there, so an 11th one won't hurt.
Is this lite programmer mechanically compatible (i.e. will it fit into the same case as the normal programmer)?
The main problem I see for assembly is the USB connector. Replacing it with a through-hole part, while breaking mechanical compability, would make it easier to hand-solder (as JLCPCB does not solder connectors).
P.S.: Why not just put the design into free-pdk git, as an alternative programmer, to make it easier for people to have a closer look (and github issues might be better for discussion of individual features than this forum thread). We already have 10 repos there, so an 11th one won't hurt.
Yes, it should be 100% mechanically compatible. I considered your proposal of adding a through-hole USB connector. But unfortunately those are only available as A-type plug or socket. Adding them would have required significant changes to the board layout. Also type-A connectors seem to be somewhat outdated. So I stuck with the Micro-B, but moved some components around for easier soldering.
I can add the design files and ordering instructions to the easkypdk repository after testing.
Is this lite programmer mechanically compatible (i.e. will it fit into the same case as the normal programmer)?
The main problem I see for assembly is the USB connector. Replacing it with a through-hole part, while breaking mechanical compability, would make it easier to hand-solder (as JLCPCB does not solder connectors).
P.S.: Why not just put the design into free-pdk git, as an alternative programmer, to make it easier for people to have a closer look (and github issues might be better for discussion of individual features than this forum thread). We already have 10 repos there, so an 11th one won't hurt.
Yes, it should be 100% mechanically compatible. I considered your proposal of adding a through-hole USB connector. But unfortunately those are only available as A-type plug or socket. Adding them would have required significant changes to the board layout. Also type-A connectors seem to be somewhat outdated. So I stuck with the Micro-B, but moved some components around for easier soldering.
I can add the design files and ordering instructions to the easkypdk repository after testing.
Hi,
in case this needs to be identified as a board variant (which I think might not be required) it would be a good idea to connect one of the unused STM32 pins (e.g. choose one from PB8-PB15) to GND.
This would make it possible to identify this hardware variant in the firmware and to handle things different in case it's needed.
JS
I connected PB8 to ground, so the board is identifiable. See circuit and design notes.
In hindsight it would make sense to have one pin to indicate whether a crystal is present and a few others to identify boards. Maybe we can use PB8 to GND to identify boards without crystal? I can add some other ID pins in the final version.
I connected PB8 to ground, so the board is identifiable. See circuit and design notes.
In hindsight it would make sense to have one pin to indicate whether a crystal is present and a few others to identify boards. Maybe we can use PB8 to GND to identify boards without crystal? I can add some other ID pins in the final version.
Hi,
Crystal presence can be detected in software :-)
JS
I connected PB8 to ground, so the board is identifiable. See circuit and design notes.
In hindsight it would make sense to have one pin to indicate whether a crystal is present and a few others to identify boards. Maybe we can use PB8 to GND to identify boards without crystal? I can add some other ID pins in the final version.
Hi,
Crystal presence can be detected in software :-)
JS
Even better. Is this already implemented?
Well, then I'll keep it as it is and claim "PB8=GND" as identifier for the lite version.
Regards,
Tim
Just a heads up... before you make new version.
Right now I'm working on supporting new flash types from PADAUK (PFS172 / PFC...). It looks like programing sequence changed. Now not sending high voltage on VPP (PA5) but on VDD instead. Looks like after CMD phase (2V voltage difference between VDD and VPP, e.g. 2.5 VDD / 4.5 VPP) new protocol sets VPP to 0 for read/erase/write and VDD needs to be 8.3V for write.
==> Right now programmer can not create 8.3V on VDD (we might need to change R6, maybe same value as R8 so both opamp outputs can produce same levels).
Still investigating.
JS
Regarding the PFS172: It seems it supports two programming modes, right? This is described in unusual detail in the datasheet. The current revision of easypdkprog should be able to support the limited voltage programming mode. They just don't mention why one needs the "normal mode" at all...
Regarding the PFS172: It seems it supports two programming modes, right? This is described in unusual detail in the datasheet. The current revision of easypdkprog should be able to support the limited voltage programming mode. They just don't mention why one needs the "normal mode" at all...
Maybe the reduced volatge programming mode has reduced retention? Or programming is slower?
Regarding the PFS172: It seems it supports two programming modes, right? This is described in unusual detail in the datasheet. The current revision of easypdkprog should be able to support the limited voltage programming mode. They just don't mention why one needs the "normal mode" at all...
Maybe the reduced volatge programming mode has reduced retention? Or programming is slower?
- PB0/PB1 was moved to PA0/PA1. This kept the final board size smaller and means the blue-pill's boot mode jumpers aren't blocked. I don't think this will be a problem, although it will require a software modification, and
- PA15 isn't connected to BOOT0 (although it could be with a bodge wire). Not sure why it is on the original?
Hi,
I think I figured out "limited voltage" programing.
The logic analyzer capture showed the trick:
Programing needs 4 words on PFS172 to be programmed at same time.
In limited voltage programming mode VDD is set to 5.3V and only 1 of the 4 words is programmed (the other 3 words are all '1's, so nothing will change during programming).
After the first word is programmed, the second word of this group is programmed, ...
so instead of programing
A W W W W
it will take 4 passes:
A W X X X
A X W X X
A X X W X
A X X X W
then address is incremented and next 4 word group is programmed.
Address(A), Word(W), AllOnes(X)
This also might be a nice trick to make a real cheap programmer for the flash variants (e.g. using the 5V of Arduino and a 2 resistor voltage divider to have a second voltage to enter programing mode)
JS
This should not be a problem at all. It also can be used to auto detect the programmer variant.
This connection is intended to also have the button state on a GPIO so the programmer can be used in stand alone mode (later) - firmware is stored in MCU flash, no computer attachached, press button to program IC.
Due to the high number of different pinouts on the 8-pin Padauk devices, I had to create five different variants of the minimal evaluation boards:
https://github.com/free-pdk/f-eval-boards
This also might be a nice trick to make a real cheap programmer for the flash variants (e.g. using the 5V of Arduino and a 2 resistor voltage divider to have a second voltage to enter programing mode)
spth: I was looking at this repo yesterday and found myself desiring to see a preview of these boards. Maybe there is one somewhere and I just didn't see it? I'm not even sure what to do with the .sch and .lht files to generate my own. (What tool are those files for?) Would it be possible for you to upload some .pngs of the boards and schematics to the repo?
Tools used:
* gschem for the schematic (symbols used to be found in pdk-gschem-symbols repository)
* pcb-rnd for the pcb design
Padauk is not making any money selling the programmer, so why don't ask them for the programming protocol?
Adding support for universal programmers like TL866 can help sell tons of 3cent microcontrollers.
Would adding some photographs of the assembled boards help (even though it would show how bad I am at hand-soldering)?