Author Topic: Fremont Micro Devices - microcontroller programming  (Read 2632 times)

0 Members and 1 Guest are viewing this topic.

Offline tim_

  • Regular Contributor
  • *
  • Posts: 189
  • Country: de
Re: Fremont Micro Devices - microcontroller programming
« Reply #25 on: March 04, 2021, 08:36:37 am »
Btw, it looks like the programmer uses an STM32F103 and only few additional devices. Are the schematics available anywhere and the firmware? Maybe it is easily possible to clone the programmer with a bluepill.
 

Offline LovelyA72

  • Contributor
  • Posts: 40
  • Country: us
  • Kashikoma from Massachusetts!
Re: Fremont Micro Devices - microcontroller programming
« Reply #26 on: March 06, 2021, 02:19:18 pm »
Btw, it looks like the programmer uses an STM32F103 and only few additional devices. Are the schematics available anywhere and the firmware? Maybe it is easily possible to clone the programmer with a bluepill.
Unfortunately, the sch is not available anywhere. The firmware is available with their IDE or writer software.
Kashikoma!
 

Offline danymogh

  • Contributor
  • Posts: 29
  • Country: ge
Re: Fremont Micro Devices - microcontroller programming
« Reply #27 on: April 15, 2021, 10:21:01 pm »
I am in possession of both programmers now.

I tested the MCUs and boy they get the job done! much better than the Padauk.

another interesting fact is that there's also another company named hqwtech.com that has another series of these MCUs with different part numbers. in my opinion, there should be a parent company that is selling the chips to the other companies and they just rebrand them. the architecture is all the same. my MS80x doesn't have any print on them while the FMDs do. FMD has its own IDE which is a clone of origin-gd IDE

There are 2 types of programmers for these MCUs.
one that is the red board and is called the bridge (mine [bought from hqwtech] has a black solder mask and is versioned 2.6 and the components are a little different) and works with all the IDEs of the companies. it's capable of debugging and programming via the IDE only.

the other programmer is used for batch programming and doesn't do debugging. can be run offline and has a couple of features like burning FLASH, EEPROM, OSC calibration, checking, rolling code (where part of the EEPROM is modified and the value is incremented sequentially which I believe is mostly used for serial numbering and HCS3xx cloning). also has a Rx,Tx interface where you can send commands to the programmer via serial for things like flash and EEPROM modification on the fly for every MCU before programming it.
 

Offline danymogh

  • Contributor
  • Posts: 29
  • Country: ge
Re: Fremont Micro Devices - microcontroller programming
« Reply #28 on: April 20, 2021, 12:51:35 pm »
update:

the FMD IDE and ORIGIN IDE are basically the same. you can burn and load HEX files produced by both IDES to both chips.
if you look at the datasheets of MS8x and FMD you'll see that they're basically the same, (on page 8 of the MS81x series datasheet you'll see that Origin even forgot to change some FMD register names! )

however the unlike the PICs it's not possible to put "#pragma config xxx" and it seems that the IDE doesn't let you config them by code and it put's it's own special coding in the HEX file. hence there's some kind of obfuscation involved. if you see the HEX file produced by the IDE and you look at the one before the last line you'll see the config options there. as opposed to what says in the datasheet, the config is written starting at address 0x4000 (instead of 0x2000), and I think the programmer will detect that and apply the correct address when programming.

I wanted to test the features the config options provide, and to my surprise, the EEPROM section has no protection and there's no config to protect it. since these chips are clones of the PICs, I thought the manufacturer might be hiding some features but looking at the fusebits of PICs, I noticed that the UCFG0 mapping is different. however, some bitfields are left as preserved while they could actually do something that's not stated in the datasheet, (like the case in padauk MCUs). Chinese datasheets are very horrible and usually, there are always some parts left out and not explained.

long story short, to test the preserved bits in the config (UCFGx) section, the HEX file must be edited manually but it's not a straightforward process and it seems some additional work is required.

in case anyone's interested here is my finding on the cryptic config options that the IDE produces.
in the HEX file you'll see something like this. on the one before the last line which is the standard intel HEX format.
Code: [Select]
+-----+------+------+-----------------------------------+----------+
| len | addr | type |               data                | checksum |
+-----+------+------+-----------------------------------+----------+
| 0D  | 4000 |   00 | D4 03 E0 09 F6 05 FF 0D0102000108 | E0       |
+-----+------+------+-----------------------------------+----------+

the data part changes according to the options you select in the IDE, this option also includes the ones in the project -> properties menu like number of programming , etc. the bytes are scattered like this:

Code: [Select]
+-------+------+-------+------+-------+------+------------------+
| UCFG0 | UNK0 | UCFG1 | UNK1 | UCFG2 | UNK2 |   rest of data   |
+-------+------+-------+------+-------+------+------------------+
| D4    |   03 |  E0   |   09 |  F6   |   05 |  FF 0D0102000108 |
+-------+------+-------+------+-------+------+------------------+

I could only observe that the UCFG0-2 positions like the table above and the other parts remain unknown and also if the UCFG0 part changes some other part may change as well so it's not possible to manually modify the UCFG's and try out different options because the programmer will detect this as error (not tested).

the UNK0 and UNK1 seem to remain constant on all mixture of configurations but UNK2 changes. also the UNK values differ in each MS8x or FT6x series. the above table is for MS81 series.

if anyone has any clue I'm interested to try things out.
« Last Edit: April 20, 2021, 06:27:59 pm by danymogh »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf