Topic : Can't get R-Link to connect to STM8 board

Forum : ST7/STM8

Original Post
Post Information Post
May 4, 2011 - 2:40am
Guest

Hi. I'm new to the STM8 and Raisonance so I may have missed something obvious but... I have a new STM8 board design, with an STM8S207RB on it, wired to a 4-pin SWIM connector, to which I have connected an RLINK-ADP-ST7-STM8-V2.1, which goes to the USB on my PC (Windows 7 64-bit). I have Ride7 (7.30.10.0159) and the RKit-STM8 installed. I think the USB driver is installed OK because I can get the serial number of the Rlink, or the Die ID of the STM8, in Ride7. However, every time I attempt to start a debug session (Ctrl-D), the progress dialog hangs at "clearing emulation memory" and then I get "no response from DTC" or "communication error: Rlink_WinUSB_USB_send timeout". The pwr and busy LEDs are lit, on the USB emulator box. Sometimes the Run LED is on too.

I have the Ride7 project configured for the correct STM8. I have the jumper on the ADP set for SWIM (and no other jumpers connected). I have the reset signal on the board driven by an open-drain IC with a 2K pullup.

in RFlasher the Blank Check seems to work (tells me the flash IS blank). But Erase, Program etc. time out like Ride7.

How can I solve this problem?

Thanks
Norm

Replies
Post Information Post
+1
0
-1
May 4, 2011 - 10:56am
Raisonance Support Team

Hi Norm,

Can you first ensure that you are using the latest tools from http://www.mcu-raisonance.com/mcu_downloads.html.

Second, the ADP jumper is necessary only for low-voltage devices, you should remove it from your ADP board.

Can you try to change the device and select the STM8S208RB instead of 207?

In case anything else fails, fill the form at http://forum.raisonance.com/viewtopic.php?id=2231 and send us back the form.

Best Regards,

+1
0
-1
May 4, 2011 - 7:32pm
Guest

Thanks Bruno. Yes I am using the latest Ride7 and RKitSTM8 from your webpage. I think you misunderstand what I said about jumpers: I have the SWIM jumper set (surely that's needed) on the *ADP board*, not the *ADAPT* jumper, which is for low-voltage boards. So the jumpers are all correct, right?

I could possibly change the device to a 208, but this would take time to procure and would be messy. Do you have a specific reason for thinking that the 208 will work where the 207 does not?

I have a bit more info now, in case it helps: when I issue any commands such as Read, Erase or Program from RFlasher, the Reset line goes active, then releases, and the SWIMDATA line pulses for some time, with what looks like a clean signal. I can Read the flash and option bytes, and I can even Program the option bytes, but any command that tries to modify the flash (Erase or Program Flash) hangs, then times out, usually with a "Rlink_WinUSB_USB_send timeout". I get the same results using the command-line program STM8_pgm.exe.

Thanks
Norm

+1
0
-1
May 5, 2011 - 8:38am
Raisonance Support Team

Norm,

What I meant by "changing the device to STM8S208RB instead of 207" was just about your project settings within Ride7. Just change the device and check what happens.

Another thing to do is to use RFlasher to blank the device's flash and check whether it is properly blanked with the appropriate button. This may clear things up: As you can access the option bytes, there is a good chance that you have a problem in these.
Once this works (if it does) load your .AOF file into RFlasher, check the memory contents at address 0x4800 against default values from the documentation. Do not forget the complement bytes, failing to do so may result in a programming failure.

If you still have problems, just send us the filled form (see my previous message above) so that we can dig the problem further.

Best Regards,

+1
0
-1
May 5, 2011 - 10:20pm
Guest

Thanks for your help, Bruno. The problem turned out to be just inadequate filtering of the STM8's 1.8V power supply. I'm now debugging happily with Ride7.

Thanks
Norm