Today I started playing with the STM8-DISCOVERY board, and I tried the RS232/UART example from your website: http://www.st.com/internet/com/SOFTWARE_RESOURCES/SW_COMPONENT/FIRMWARE/um0884.zip
After having installed your STVD suite, I got the application programmed into the chip and started debugging. I had the TX and RX pins connected to a USB to UART module, which I have confirmed as working fine.
The text the board should write properly looks like this garbage:
As you can see some letters are okey, while most of them aren't. Though the boards recieves serial data fine, and I can turn on and off the led, and make it blink.Š====================== ÓTÍ8ÓÄésãïvåòy ===================ŠThés Áppìéãaôéïn és baséã åøampìå ïæ ÕÁRT énôåòæaãå ÷éôhŠWéndï÷s Èypåò Tåòménaì®ŠŠ==========================================================Š ÁÐÐLICÁTIOÎ ÍEÎÕ ºŠŠ==========================================================ŠŠ 1 Óåô LÄ1 ïnŠ 2 Óåô LÄ1 ïææŠ ³ Óåô LÄ1 bìénkŠ 4 ÂEEÐER OÎŠ µ ÂEEÐER OFFŠŠEnôåò yïuò ãhïéãå º
So the problem seems to be in the sending?!
I've tried making the board send every byte from 1 to 128, and this is the result of that count in hexadecimal:
Again, this isn't a correct count. As you might notice, 0x3 = 0x83, 0x5 = 0x85, 0x6 = 0x86 - like it adds 0x80? And it's the same pattern that happens all the time, so the garbaged characters is always the same!01 02 83 04 85 86 07 08 89 8A 0B 8C 0D 0E 8F 1091 92 13 94 15 16 97 98 19 1A 9B 1C 9D 9E 1F 20A1 A2 23 A4 25 26 A7 A8 29 2A AB 2C AD AE 2F B031 32 B3 34 B5 B6 37 38 B9 BA 3B BC 3D 3E BF 40C1 C2 43 C4 45 46 C7 C8 49 4A CB 4C CD CE 4F D051 52 D3 54 D5 D6 57 58 D9 DA 5B DC 5D 5E DF E061 62 E3 64 E5 E6 67 68 E9 EA 6B EC 6D 6E EF 70F1 F2 73 F4 75 76 F7 F8 79 7A FB 7C FD FE 7F
Do you have an idea?