2009-05-22 04:43 AM
Communication STM8S/128-EVAL/A
2011-05-17 06:03 AM
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 kokos2011-05-17 06:03 AM
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 Matti2011-05-17 06:03 AM
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
2011-05-17 06:03 AM
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 mozra2011-05-17 06:03 AM
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