Topic : Permanently configure low speed mode

Forum : ST7/STM8

Original Post
Post Information Post
December 30, 2015 - 10:08am
Pierre-André Tapparel


The programmer is interfaced with Labview using command line with STM8_pgm.exe, everything logically works well.

I have to use long cable for programming SMT8L during production and thus is many problems, usually the error is: "Unable to switch to high speed mode"

- How do I configure the programmer to only works in low speed mode?

- How to correctly use the "Erase slowly" command for "Erase All"? do I have to "send" ES and then EA in two separated commands?

- I use C, V, D command during production too, how to use them in slow mode?

Best regards

Post Information Post
January 5, 2016 - 10:42am
vincent choplin


The SWIM protocol is not designed to work over "long lines". There is no guarantee that it can be done, even in slow mode. How long are your lines?

The ES command does NOT affect the SWIM com speed. It affects the Erase algorithm, and in your situation (long lines) I would not expect any improvement from using it. But if you want to give it a try, you must use it before other erase commands: "STM8_pgm TSTM8S208RB ES EA"

The first thing to do is to check that you have correct connections. For some reason, there are people who believe that they don't have to connect VCC, GND or RST, and indeed it might appear to work without some of them in some situations, but it's never reliable (especially, but not only, when increasing the length of the lines ;) ) and it might even damage or lock some HW. (target board or RLink ADP)

The next best hope is to try and adapt the lines. Move the ADAPT jumper of the ADP ON/OFF. You might also want to add/remove serial/pullup resistors on the board/cable/ADP. But I cannot help you much more here, because it really depends on your target board, power, the length of your lines, etc.

Activating slow mode is not available using a "normal" command any more, because it was causing more trouble that it was solving problems.
You can do it, without guarantee, by using this trick:

* Edit (not using Ride) this file: <Ride>\bin\STM8_SWIM_ProductInfo.txt

* Around line 10 (in the "STM8" section), add this line:

* Save the file, retry the programming.

I wouldn't put much hope in this, but it might be worth a try.

Best Regards,


January 5, 2016 - 2:18pm
Pierre-André Tapparel

Thank you for all information,

The test bench is built in order to process 20 devices in the same time, the longest PCB trace is 45cm... It is not looking so long in real world:s 

From my point of view the 4 signal lines are connected, but OK there is some components on VCC/GND for measuring power, and multiplexers on the RST/SWIM not to help.

I've made some test with STVP and ST-Link/V2; reading/writing the release firmware seems OK, using this software I discovered than the "blank check" and "erase" functions are disabled for the STM8L152C8 and those are the function whith which I have the most problem. Perhaps something is related and as you says the adaptation could be a problem, I've simply copy/paste your adapter on "my" interface board circuit.

I'll do some other tests the following days and give you the results!