Topic : STM8 and SWIM problem

Forum : ST7/STM8

Original Post
Post Information Post
October 1, 2009 - 12:54pm
Guest

I am using the following tools and hardware ...

Ride 7 Version 7.24.09.0251
RKit STM8 for Ride 7 Version 2.24.09.0238
RLink Debugger / Programmer with V2.1 Adaptor board.
I am communicating with an STM8A5169 via the SWIM interface.

I have connected all of the wires GND,VCC, Data/SWIM, RESET/nReset directly to the pins with no extra pullups.
All jumpers are disconnected on the adaptor board except for the ICC/SWIM jumper which is to the right (SWIM).

Problem
---------

I power the STM8 and try to "Connect to target STM8 and read die ID" from within RFlasher 7 (using and get the error message "Error during SWIM entry sequence: No response from the target STM8".

If I look (using a logic analyser) at the Reset and Data pins both go low for a matter of nanoseconds when I start the request and then nothing else happens on the data line.

Let me know any other information you require...
Please can you help?

Replies
Post Information Post
+1
0
-1
October 1, 2009 - 2:35pm
Raisonance Support Team

Hi,

Here are a few hints...

Is your power lower than 3V?
If yes, then you should plug the "Adapt" jumper.
If not, then you can plug it anyways, it will not hurt. (might be increasing consumption a little, but for now you have more critical problems.)

Is there a capacitor of the correct value on the VCAP pin? This is mandatory for any operation with the STM8.

Is there STVD or STVP installed on your system? There might be file conflicts if yes, especially if it is an old version.

Are there any other components on the RST or DATA signals, apart from the RLink and the STM8?

Does the DATA pin go low just one time or does it toggle a few times? It should toggle a few times. If not, please disconnect the RST and DATA signals from the STM8 board, keep GND and VCC, and check if you observe the same thing on RST and DATA signals on RLink side.

Best Regards,

Vincent

+1
0
-1
October 1, 2009 - 3:57pm
Guest

Hi Vincent

Thanks for these suggestions, here are my findings...

1) It is running at 5V however as suggested I did Add the "Adapt" Jumper on the Adaptor Board.

2) The VCAP capacitor is present and is a 470nF to GND as suggested by the stm8af5169 data sheet.

3) STVD or STVP were installed on my Laptop and I did a full uninstall of both of these pieces of software as suggested and a reboot of my laptop afterwards.

4) There are no other components on the RST or DATA lines both are direct connections to the RLink V2.1 Adaptor board and the STM8 chip.

Having made the above changes I looked at the RESET and DATA pins on the Adaptor board and now see the following......

The RESET Pin goes low for 10ns, followed by the DATA pin going low several (roughly 8) times for between 10ns and 40ns, the RESET pin then seems to go low for 110ns and then 30ns.

I only captured this much of the negotiation on my logic analyser but it looks like more is happening now than before. All of this was done with all of the wires still attached between the STM8 and the RLink.

Unfortunately all of this is still followed by the error message as before ... "Error during SWIM entry sequence: No response from the target STM8".

Are there any other things I can try to get this working?

Regards
Craig

+1
0
-1
October 2, 2009 - 1:41pm
Raisonance Support Team

Hi,

Well, the STM8 not responding could come from a lot of sources.

From your tests we know that the RLink is not physically damaged, that the USB driver is OK, and that the PC software is mostly OK. Just to rule out any software problem, check that you don't any files left from STVD:
search your hard drives for "RLinkSTM8drv.dll" and "MonitorTools.dll" (they should be in \bin and only there)

On the other hand, it might be worth giving a try at connecting using STVD or STVP, if possible on another PC to avoid any conflict with Ride.

If that doesn't help, then we must look for a problem in your board or CPU...
Do you have other boards to try? (demo boards from ST or Raisonance)
Is your CPU a prototype? (Did you get it from a standard distribution process?)
Are you sure that your powering of the STM8 is correct?
Can you send us your board's schematic?

Best Regards,

Vincent

+1
0
-1
October 5, 2009 - 8:54am
Guest

Hi

Having searched for the files specified "RLinkSTM8drv.dll" was only in 'C:\ProgramFiles\Raisonance\Ride\bin' however
"MonitorTools.dll" was in several places so I renamed it in every location except the 'C:\ProgramFiles\Raisonance\Ride\bin' directory.

I did try to install and run STVP/STVD and unfortunately the software kept giving a fatal exception so I gave that idea up very quickly.

I have spoken to my manager and hopefully he will be able to forward on a schematic in order to check the CPU and schematic layout, unfortunately I dont have another STM8 development kit or chip to try.

Regards
Craig

+1
0
-1
December 3, 2011 - 10:24pm
Guest

Hi, I had same problem like this. I have checked all connection and see that STM8 SWIM Data pin has too few solder.

Soldered as new all functioned well.

I hope it helps.

EDIT:
PCB custom board with an STM8S207 (not a Reva or Raisonance product)
Ride7 7.32.11
Rlink (ADP jumpers: SWIM jumper only, no adapt, no 12MHz, no PW5V)
SWIM pin with 2200 ohm pull up
RESET pin with RC circuit