cancel
Showing results for 
Search instead for 
Did you mean: 

FM0+, FM3 & FM4 MCU

MMVel
New Contributor

Dear all, we need an old version of FlashMCU programmer for FM0+, FM3 & FM4. We need version V01L19 or V01L20, but we can't find them in the Cypress Internet site, only the last version has a link.

The old version should work from the command line, while the new one doesn't do anything if launched with parameters like this:

flash.exe "MB9BF418S/T" 4MHz test.mhx COM37 dialog

Is it possible to get it? Thanks in advance.

0 Likes
1 Solution
HolgerW_56
Employee

Wondering, about the FLASHly crash ... but good to hear that now at least MCU Flash Programmer works also with the latest version.

Regarding the protocol you can investigate by observing the communication. Basically it has 3 commands:

1) Reset command sequence (can be used also for checking the communication
PC send 0x18h ... shall be answered with 0x11 from the MCU

2) Download command sequence
PC send 0x00, Download start address in RAM (4 bytes, LSB..MSB), Download Length (4 bytes, LSB...MSB),  SUM value of command block (1 byte) 
MCU response: 0x01 (success)

PC send download data (n-bytes), SUM value of download data (1 byte)
MCU response: 0x01 (success)

3) Execute Command (Jump to Run start address)
PC send 0x40, 0, 0, 0, 0, 0, 0, 0, 0, 0x40, 
The MCU jumps now into the RAM start address specified by the download command

That's it (from my opinion), what is supported by the pure MCU boot ROM. The rest depends on your download kernel program that you have to develop and that you have to download in step 2 mentioned above. I have no details on the Cypress kernels itself. If you like to use those, probably you can do reverse engineering by yourself by observing the communication.

#Holger

View solution in original post

0 Likes
8 Replies
Roy_Liu
Moderator
Moderator

Dear MMVel,

V01L16 version can be found from this CD - https://www.cypress.com/documentation/software-and-drivers/sk-fm4-176l-s6e2cca-cd

However, I don't know if it supports command line or not.  You specified 19/20 version should work from the command line, is that per your experience or any document stating this?

Roy Liu
0 Likes
MMVel
New Contributor

Thanks Roy for your reply. No, I never tried version 19/20, but I found these two topics that talks about command line flash programming.

The first one refers to Serial Programming and doesn't specify the version. Anyway version V01L23 (the current one) does nothing if launched from the command line with parameters:

https://community.cypress.com/t5/FM0-FM3-FM4-MCU/Command-line-MB9BF418TPMC-flasher/m-p/146922

The second one refers to USB Programming and specifies that command line is supported in versions 19/20 but may be removed in future versions

https://community.cypress.com/t5/FM0-FM3-FM4-MCU/Flash-USB-Direct-and-command-line-options/m-p/14597...

So I thought that the only way to get a working Serial Programming from command was trying version 19/20. Am I wrong?

0 Likes
Roy_Liu
Moderator
Moderator

What exactly is the command you entered? As mentioned in the first topic, the parameters should be defined per the setup in your hand. BTW, the V01L23 version was released around 2015 which is much earlier than the topic started in 2019, so it should refer to the current version.

For the second topic, it is USB Direct Programmer - https://www.cypress.com/documentation/software-and-drivers/flash-usb-direct-programmer-1 you will see the version is V01L20, it should be different software. 

@HolgerW_56  Any comment?

Various Flash programmers are listed here - https://www.cypress.com/documentation/software-and-drivers/flash-programmer 

Roy Liu
0 Likes
MMVel
New Contributor

Anyway I just tried the old version V01L16, but as version V01L23, it does nothing if launched from the command line with parameters... I really don't understand why.

0 Likes
HolgerW_56
Employee

Hi MMVel,

I just tested it successfully with V01L23

Newer versions of MCU Flash Programmer tool require also the Crystal Frequency in the command, but you have this already described correctly,
so I used : flash.exe "S6E2CCAH0A/J0A/L0A" 4MHz _readout.mhx COM106 dialog

Please can you check, whether there is an MESSFILE.TXT stored after you have started the flash.exe ... Probably it gives you some error message inside.
Please let us know the content of your MESSFILE.TXT

If you like you can have a look to another 3rd party tool called FLASHly on www.holgerium.de/elektronik -> FLASHly
It can be used with some FM3/4 MCUs and supports command line. Maybe this helps you as alternative?!

Holger

0 Likes
MMVel
New Contributor

Thanks Roy_Liu and HolgerW_56 for your support.

The command line I used was:

FlashMCU.exe "MB9BF564K/L" 16MHz "C:\workspace\CY9B564K\debug\2038A3.srec" COM8 dialog

The command line returned without any error, no window appeared and no MESSFILE.TXT was created. Then I tried to reboot my PC and now it works... I really don't know what locked the software before the reboot. I am using Windows 10 and a USB to SERIAL converter based on the FTDI chip, but the serial port was working correctly even before the reboot.

Sorry for the bother.

I have also tried FLASHly tool and, after the erase command, it crashes while asking to reboot the device and to click OK... I have to terminate FLASHly from the Windows Tasks Manager.

Just another question: the protocol used by the MCU Flash Programmer is described in any document? I found this python tool that tries to upload a bootloader to RAM

https://github.com/shuffle2/fujitsu_rom_com/blob/master/fujitsu_rom_com.py

It uses 0x18 ping command, 0x00 write command, 0xc0 finalize command, and so on... Is there a document with these commands and their specifications?

Thanks in advance

0 Likes
HolgerW_56
Employee

Wondering, about the FLASHly crash ... but good to hear that now at least MCU Flash Programmer works also with the latest version.

Regarding the protocol you can investigate by observing the communication. Basically it has 3 commands:

1) Reset command sequence (can be used also for checking the communication
PC send 0x18h ... shall be answered with 0x11 from the MCU

2) Download command sequence
PC send 0x00, Download start address in RAM (4 bytes, LSB..MSB), Download Length (4 bytes, LSB...MSB),  SUM value of command block (1 byte) 
MCU response: 0x01 (success)

PC send download data (n-bytes), SUM value of download data (1 byte)
MCU response: 0x01 (success)

3) Execute Command (Jump to Run start address)
PC send 0x40, 0, 0, 0, 0, 0, 0, 0, 0, 0x40, 
The MCU jumps now into the RAM start address specified by the download command

That's it (from my opinion), what is supported by the pure MCU boot ROM. The rest depends on your download kernel program that you have to develop and that you have to download in step 2 mentioned above. I have no details on the Cypress kernels itself. If you like to use those, probably you can do reverse engineering by yourself by observing the communication.

#Holger

View solution in original post

0 Likes
MMVel
New Contributor

Everything is clear, thank you very much!

0 Likes
Top labels