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

0 Members and 1 Guest are viewing this topic.

Offline tim_

  • Regular Contributor
  • *
  • Posts: 237
  • 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

  • Regular Contributor
  • *
  • Posts: 60
  • 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

  • Regular Contributor
  • *
  • Posts: 51
  • 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

  • Regular Contributor
  • *
  • Posts: 51
  • 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 »
 
The following users thanked this post: msaelzer

Offline HoangAnh

  • Newbie
  • Posts: 1
  • Country: vn
Re: Fremont Micro Devices - microcontroller programming
« Reply #29 on: November 18, 2021, 10:04:35 am »
Hi everyone,
I replied on this topic (But I don't understand why I'm banned. Sorry if I doing something wrong, please let me know if I'm wrong).
I found this MCU MS80F0601A on the Taobao. But I'm confusing about which programmer should I have to buy?
I found a board, but I'm not sure that it correctly what I want.
And I have another question, this MCU can be re-programming?
Thank all.
 

Offline Evgeni61

  • Newbie
  • Posts: 2
  • Country: ua
Re: Fremont Micro Devices - microcontroller programming
« Reply #30 on: April 03, 2022, 02:01:06 pm »
Hello friends. I can't find the FMD-IDE software. Can you help me? Thanks
 

Offline Evgeni61

  • Newbie
  • Posts: 2
  • Country: ua
Re: Fremont Micro Devices - microcontroller programming
« Reply #31 on: April 03, 2022, 04:46:32 pm »
How can I find out the compatibility of FMD chips with PIC chips? Does anyone have a table?
 

Offline Davor

  • Contributor
  • Posts: 13
  • Country: hr
Re: Fremont Micro Devices - microcontroller programming
« Reply #32 on: April 04, 2022, 05:58:07 pm »
Interestig thread on wrong subforum, should be moved here:
https://www.eevblog.com/forum/microcontrollers/
 

Offline Kukaz

  • Newbie
  • Posts: 2
  • Country: ru
Re: Fremont Micro Devices - microcontroller programming
« Reply #33 on: June 22, 2022, 07:56:35 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.
The board bluepill uses a chip STM32F103C8T6 - the programmer needs STM32F103RB...
 

Offline buttim

  • Contributor
  • Posts: 24
  • Country: it
Re: Fremont Micro Devices - microcontroller programming
« Reply #34 on: August 16, 2022, 11:05:55 am »
Hi socram. Is your Arduino code available somewhere? I'm trying to identify an MCU with erased markings that might be from Fremont Micro.
Thanks!
 

Offline Bikkel

  • Newbie
  • Posts: 8
  • Country: za
Re: Fremont Micro Devices - microcontroller programming
« Reply #35 on: August 16, 2022, 11:23:06 am »
The peripherals look the same. There one thing they differ on is the interrupt handling. It seems they use a single interrupt in which you must decide what causes the interrupt. I am still pulling the Chinese data sheets through google translate.
 

Offline tongdaren

  • Newbie
  • Posts: 1
  • Country: cn
Re: Fremont Micro Devices - microcontroller programming
« Reply #36 on: August 20, 2022, 11:25:45 am »
Programmer need bootloader
 

Offline gashtaan

  • Contributor
  • Posts: 40
  • Country: sk
Re: Fremont Micro Devices - microcontroller programming
« Reply #37 on: March 05, 2023, 09:59:45 am »
Hi,
anyone knows how FMD MCUs with flash protection enabled behave? I'm playing with FT61F043* (probably, no part number printed on IC, but pinout suggests it) used in some power meter. When I read IC ID, it responses with seemingly correct data:
0444 3F12 030A 3F12 010A 0510 194A 29D0 18B1 3FFF 3FFF 3FFF 3FFF 3FFF 3FFF 3FFF
(the programmer firmware checks the fist byte to 0x04 to validate it)

But when I reading the flash memory the data seems somehow scrambled:
1F9F 3F9F 0F9F 0F9F 0FFF 0F9F 0FFF 0F9F 0FFF 1F9F 3F9F 1F9F 3F9F 2FBF 1F9F 3F9F
1F9F 0FBF 3FFF 1F9F 0FBF 3FFF 1F9F 0FBF 3FFF 1F9F 0FBF 2FFF 1F9F 0FDF 2F9F 0FDF
...

I guess the reason is enabled flash protection, although I expected reading just 0x0000 or 0x3FFF in such case.
 

Offline buttim

  • Contributor
  • Posts: 24
  • Country: it
Re: Fremont Micro Devices - microcontroller programming
« Reply #38 on: March 06, 2023, 03:28:30 pm »
Did you manage to download the Fremont IDE gashtaan? It seems the download is disabled...
 

Offline Davor

  • Contributor
  • Posts: 13
  • Country: hr
Re: Fremont Micro Devices - microcontroller programming
« Reply #39 on: March 06, 2023, 10:55:40 pm »
Link for FMD IDE 3.0.9E:

https://we.tl/t-BWLkoqhfch
 
The following users thanked this post: danymogh

Offline buttim

  • Contributor
  • Posts: 24
  • Country: it
Re: Fremont Micro Devices - microcontroller programming
« Reply #40 on: March 06, 2023, 10:59:11 pm »
Thanks a lot! May I ask you how did you get it?
 

Offline Davor

  • Contributor
  • Posts: 13
  • Country: hr
 
The following users thanked this post: buttim

Offline buttim

  • Contributor
  • Posts: 24
  • Country: it
Re: Fremont Micro Devices - microcontroller programming
« Reply #42 on: March 06, 2023, 11:37:03 pm »
One more question: have you (or anybody else) figured out how to read the FMD chips markings?
My FT60F211-RB read "B2H7CKH"...
 

Offline gashtaan

  • Contributor
  • Posts: 40
  • Country: sk
Re: Fremont Micro Devices - microcontroller programming
« Reply #43 on: March 07, 2023, 07:27:23 am »
Did you manage to download the Fremont IDE gashtaan? It seems the download is disabled...
No, I looked only into the programmer firmware and that is free to download.
 

Offline danymogh

  • Regular Contributor
  • *
  • Posts: 51
  • Country: ge
Re: Fremont Micro Devices - microcontroller programming
« Reply #44 on: March 07, 2023, 04:11:26 pm »
Hi,
anyone knows how FMD MCUs with flash protection enabled behave? I'm playing with FT61F043* (probably, no part number printed on IC, but pinout suggests it) used in some power meter. When I read IC ID, it responses with seemingly correct data:
0444 3F12 030A 3F12 010A 0510 194A 29D0 18B1 3FFF 3FFF 3FFF 3FFF 3FFF 3FFF 3FFF
(the programmer firmware checks the fist byte to 0x04 to validate it)

But when I reading the flash memory the data seems somehow scrambled:
1F9F 3F9F 0F9F 0F9F 0FFF 0F9F 0FFF 0F9F 0FFF 1F9F 3F9F 1F9F 3F9F 2FBF 1F9F 3F9F
1F9F 0FBF 3FFF 1F9F 0FBF 3FFF 1F9F 0FBF 3FFF 1F9F 0FBF 2FFF 1F9F 0FDF 2F9F 0FDF
...

I guess the reason is enabled flash protection, although I expected reading just 0x0000 or 0x3FFF in such case.

if I enable Flash protection the programmer reads 0xFFF for all bytes. so maybe you have faulty wiring? or some other setup or chips?

could you enable EEPROM protection by any chance?
 

Offline gashtaan

  • Contributor
  • Posts: 40
  • Country: sk
Re: Fremont Micro Devices - microcontroller programming
« Reply #45 on: March 07, 2023, 05:34:36 pm »
if I enable Flash protection the programmer reads 0xFFF for all bytes. so maybe you have faulty wiring? or some other setup or chips?
could you enable EEPROM protection by any chance?
Are you sure it reads 0xFFF not 0x3FFF?

I doubt the faulty wiring is the problem. I would expect some randomness it such case, but I got the same data every time, even for various clock timing (15ns vs 150ns).

The problem is that I have no clue what data should I expect to be read. Here are other readings:

UCFG data:
09A4 07D2 02F3 03C0 0508 02FF 02FF 07F8 0FFF 0FFF 00FF 00FF 3FFF 3FFF 3FFF 3FFF
...

EEPROM:
40 00 00 40 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
...

Attaching scope photo of one sequence of reading data from flash (0x0D command, read value, 0x0C command, read value, 0x05 command). Blue signal is the data, green the clock and yellow is just to show, when the data are transmitted from the FMD.
« Last Edit: March 08, 2023, 09:24:28 am by gashtaan »
 

Offline buttim

  • Contributor
  • Posts: 24
  • Country: it
Re: Fremont Micro Devices - microcontroller programming
« Reply #46 on: March 07, 2023, 05:37:53 pm »
Data, clock and... ?
 

Offline gashtaan

  • Contributor
  • Posts: 40
  • Country: sk
Re: Fremont Micro Devices - microcontroller programming
« Reply #47 on: March 07, 2023, 05:41:32 pm »
Data, clock and... ?
Yellow is generated by me for clarity, its high when I set ISPDAT to input, the blue data signal is generated by FMD at that time.
 

Offline buttim

  • Contributor
  • Posts: 24
  • Country: it
Re: Fremont Micro Devices - microcontroller programming
« Reply #48 on: March 07, 2023, 05:43:26 pm »
I realized only now you're using your own programmer. Am I right?
Would you mind sharing the code?
« Last Edit: March 08, 2023, 10:55:52 pm by buttim »
 

Offline gashtaan

  • Contributor
  • Posts: 40
  • Country: sk
Re: Fremont Micro Devices - microcontroller programming
« Reply #49 on: March 07, 2023, 05:48:54 pm »
Would you mind sharing the code?
Sure, later when it'll be actually working code I'll put it to github :)
« Last Edit: March 07, 2023, 05:51:11 pm by gashtaan »
 
The following users thanked this post: buttim


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf