free-pdk / easy-pdk-programmer-software

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

PFS122 support #52

Open spth opened 3 years ago

spth commented 3 years ago

A while ago, Padauk released the PFS 122.

Since this is a flash device, I'd expect it to be popular among hobbyists, and it would be good to have support for it.

kibix commented 1 year ago

I am happy to pay a bounty and support testing if PFS122 support can be added

bonnom commented 1 year ago

JS added PFS122 to the development branch last week! So you can start testing it out. It seems like the PFS122 is just a PFS173

kibix commented 1 year ago

Yes, thanks for the hint ! I tested today with the previous version, selecting the PFS172 (that is also as what the chip identifies), and it programs well. The include files for SDCC are missing a register for the PFS122 (which has 16bit results from AD, compared to 8bit on other models), but that is, obviously, trivial to fix.

So i can confirm that even without a specific PFS122 setting, the chip can be correctly programmed by selecting PFS172.

Cheers

Johannes

bonnom commented 1 year ago

I think the PFS172 may have already had a 12bit ADC. For the PFS173 they discovered at least 11bits of the adc https://free-pdk.github.io/undocumented-features#11-bit-adc-pfs173. If you have an PFS172 you can try to read the lower adc bits from the adress 0x23!