cancel
Showing results for 
Search instead for 
Did you mean: 

Communication STM8S/128-EVAL/A

matti_69
Associate II
Posted on May 22, 2009 at 13:43

Communication STM8S/128-EVAL/A

5 REPLIES 5
matti_69
Associate II
Posted on May 17, 2011 at 15:03

Hi,

I have a problem with communication board (STM8S/128-EVAL/A),

I use in my application port_H as output but then I change for the port_D. I compiled and programmed but during verify was error. Now I haven't communicated it.

What can I do? Have you got any idea how to slove this problem?

sory for my language mistake

Best regards

kokos

matti_69
Associate II
Posted on May 17, 2011 at 15:03

Hi

Ok so I should replace the microcontroller?

According to documentation it's possible or I understood incorrectly.

SWIM disable

By default, after an MCU reset, the SWIM pin is configured to allow communication with an external tool for debugging or Flash/EEPROM programming. This pin can be configured for use as general purpose I/O by the application. This is done by setting the SWD bit in the CFG_GCR register.

Best regards

Matti

matti_69
Associate II
Posted on May 17, 2011 at 15:03

According to documentation when SWIM mode is enabled (register CFG_GCR, SWD=0), the SWIM pin can not be used as general purpose I/O. I should have disabled SWIM mode earlier (SWD=1).I suppose that the microkontroler is blocked

mozra27
Associate II
Posted on May 17, 2011 at 15:03

Hi Matti,

This is a normal behavior, if you use the SWIM to debug your application you dont have to use the PD1 pin (SWIM pin) as GPIO and if you want use this pin you can run your application in mode standalone...

But I don't understand if you disable the SWIM, how you can debug your application???

Regards

mozra

bassinux
Associate II
Posted on May 17, 2011 at 15:03

Hi Matti_69,

You should n't replace your micro,

As Mozra said it's a normal behaviour for STM8S, and I want to add that for debug purpose SWD must be set to 0 and If you want to use the PD1 pin (Swim pin) you must just set SWD in CFG_GCR register to 1, but you can't be able to continue debugging because communication between debugging tool and debug module integrated in the chip is stopped.

So I can you suggest you to use an other pin and you can debug you application, if all it's OK you change to the pin PD1 and put SWD to 1 and program your application.

Best Regards

Bassinux