cancel
Showing results for 
Search instead for 
Did you mean: 

Best/fastest API for C# desktop app read/write memory of several STM32 mcu's via StLinks, V2.1 and V3.

1234PJ
Associate II

Currently I tried STM32Programmer_CLI and ST-LINK_CLI, both more than 100 times slower than StmStudio - StLink - SWD - MCU. The solution can only work up to 4Hz with 1 mcu and less with >1 mcu. StmStudio can run at least 250Hz with more exchanged data.

I tried this: "C:\Program Files (x86)\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\STM32_Programmer_CLI.exe" -c port=SWD sn={serialNumber} mode=HOTPLUG speed=Fast -r8 0x20000000 0x8"

I need to run up to 20 mcu's simultaneously (6 is minimum), at least one must exchange data faster than 10Hz, prefer >50Hz, the rest can run 1Hz or sub 1Hz. Must be able to be addressed by StLink serialnumber.

Mcu firmware is locked so far. Mcu Hardware (circuit/PCB) is locked, so stuck with SWD, no USB/serialport.

Would another interface improve interface speed, e.g. Segger J-Link?

I am currently trying to get StLink-lib.dll working, will it be faster?

 

Please note, I am a hardware designer so software is not my primary job.

ANY advice is appreciated, especially if it is detailed and easy to understand, assume I am new to this.

Any guides/videos on this topic would be great, but any help/insight really.

 

10 REPLIES 10
1234PJ
Associate II

This will be used for production tuning/testing of boards, minimum 6pcs and maximum 20pcs.

The solution I have tried so far has a high overhead, meaning it will open/close for each command/request and it contains much more data than what is relevant.

Best case, I can open "a channel" to a mcu, at this time all the "overhead" data is relevant, after that it would be beneficial if only SN of the stlink + the data was exchanged, I assume this is what stmstudio does?

Currently we are running a testsoftware in NodeRed/CobeMON, but it is very difficult to change from one testsoftware to another and it is not very stable.

I am not fixed on using C#.

liaifat85
Senior III

Segger J-Link can provide a better speed. 

Do you know how mush faster it is?

What would my approach be, I assume there might be more than one API available?

 

That would be specific to Segger - nothing to  do with ST.

Probably better to ask Segger: https://forum.segger.com/index.php/Board/3-J-Link-Flasher-related/

 

 

Thanks, of course I can address it in the Segger J-link forum.

Finding a "fast and stable" way of getting memory data, in an out of an STM32 mcu, certainly has something to do with ST, as long as I am working on STM32 mcu's.  

But finding what is supported by a Segger J-Link, and what is the performance of a Segger J-Link aren't to do with ST!

I must admit, I would prefer to use stlinks, and hope someone has a good solution with that.

One of the reasons (at least, so Segger would say) that J-Links are so much more expensive is that they offer (much?) higher performance.

ST-Links focus on being low-cost.

I agree, this is why I want to use StLink, also of course, we have them already in our testbench.