Topic : Programming STM8S103K3 with RFLasher

Forum : ST7/STM8

Original Post
Post Information Post
February 18, 2009 - 9:59am
Guest

I am using STM8S103K3 micro and I am experiencing serious difficulties when using RFlasher7 programming environment:
- it is NOT possible to erase totally FLASH memory (error message is showing "Flash is not blank" when verifying through the "Blank Check" command)
- it is NOT possible to program more than 765 octets in FLASH memory (process stops then message "No Response From the DTC" shows up)

Note: using STM8/128-EVAL evaluation board with STM8S208 micro, RFlasher works well

Configuration:
- Ride7: 7.16.0000
- RKit-STM8: 2.14.0901
- STX-Rlink Serial number: dngSTD000012258
- Jumpers set on STX-Rlink connector: SWIM
- application powered with external 5V supply
- PC: Xeon 3GHz/1GHz RAM, Windows XP Pro, SP1

Replies
Post Information Post
+1
0
-1
February 18, 2009 - 11:03am
Raisonance Support Team

Hi,

I called my contact at ST, and this chip is not officially released yet.
You probably have a prototype...?
I never physically had it in my hands and of course I couldn't validate it.

They will send me a few samples and I will correct the software and send you a patch.
That will take a few days.

Thank you for your patience.

Best Regards,

Vincent

+1
0
-1
February 18, 2009 - 11:07am
Guest

Thanks for your prompt reply.
I confirm I have STM8S103K3 prototypes.
Waiting for good news then.
M.

+1
0
-1
March 2, 2009 - 2:59pm
Guest

Hi,

i have the same problem. If i want to debug or flash
the STM8S103K3T6C$U1
i get the error message "No response to the DTC".
Is there already a patch for this problem?

+1
0
-1
March 2, 2009 - 5:12pm
Raisonance Support Team

Hi,

I have made a patch but there have been some issues and it is still under validation by MCart.
If you want to give it a try, you can take the latest version here:
ftp://... <<<< Edit: this file was wrong. see new version below >>>

Keep in mind that these are test files, not guaranteed to work and potentially introducing more problems than they solve. (that means save the old files before using these!) Anyways, any feedback is welcomed.

Best Regards,

Vincent

+1
0
-1
March 2, 2009 - 5:16pm
Raisonance Support Team

Well, it looks like there is (again) a problem with our new ftp server.
Here is the file on the old server:

ftp://... <<<< Edit: this file was wrong. see new version below >>>

Best Regards,

Vincent

+1
0
-1
March 3, 2009 - 11:02am
Guest

Hi Vincent,

the first debugging steps with the patch are working fine.

Thanks!

+1
0
-1
March 3, 2009 - 5:32pm
Raisonance Support Team

Hi,

Thanks for your feedback.

MCart found a problem with Option Bytes in the previous patch.
Here is the new version:
ftp://217.71.112.106/temp/ST/patch_090303_STM8S103K3.zip

Best Regards,

Vincent

+1
0
-1
March 11, 2009 - 4:53pm
Guest

Hi Vincent,

the debugger RLINK programmes the default values of
the option bytes. RFlasher7 programmes the values i
defined in the asm-file.
How can i tell the debugger to program my values?

I've installed the newest patch above.

Best Regards,

cs

+1
0
-1
March 11, 2009 - 5:31pm
Raisonance Support Team

Hi,

The debugger programs the Option Bytes fine on my PC. There are a few things to take care of though:

The debugging cannot work if read or write protections are set.

It is your responsibility to make sure that the values in the complement bytes are consistent with the 'normal' ones.

What values are you trying to program in the Option Bytes?

How do you observe that they are not programmed? (in the memory view? in the behavior of the chip?)

Best Regards,

Vincent

+1
0
-1
March 12, 2009 - 7:28am
Guest

Hi,

i want to map the TIM1_CH1N of the STM8S103K2T6 to PC3.

The option bytes are:

-------------------------------------------------------------------
;This file contains the values to program in the option bytes.
;You can change the values below according to the device datasheet.
;Be careful to respect the complement bytes,
; or the default values of the option bytes will be used.

;See the device datasheet for more information on the meaning of each bit.

cseg at 04800h

db 000h ;LOCKBYTE read out protection disabled

db 000h ;OPT1 no user boot code area
db 0FFh ;NOPT1

; OPT2 bit7 1 PC3 TIM1_CH1N, PC4 TIM1_CH2N
; bit6 0 PD7 TLI
; bit5 0 PD0 TIM1_BKIN
; bit4 0 PB5 I2C_SDA
; bit3 0 PC3 TIM1_CH3
; bit2 0 AIN2 not mapped to PC4, AIN3 not mapped to PD2
; bit1 0 PD2 not TIM5_CH3
; bit0 1 PC5 TIM5_CH1, PC6 TIM1_CH1, PC7 TIM1_CH2
; OPT2=0x81; NOPT2=7E;

db 081h ;OPT2
db 07Eh ;NOPT2

db 000h ;OPT3
db 0FFh ;NOPT3

db 000h ;OPT4
db 0FFh ;NOPT4

db 000h ;OPT5
db 0FFh ;NOPT5

db 000h ;OPT6 reserved
db 0FFh ;NOPT6

db 000h ;OPT7 not available in STM8S103
db 0FFh ;NOPT7

end
------------------------------------------------------------------

At debugging i can measure the TIM1_CH1N signal at PB0.
To verify the option bytes i read out the chip with RFlasher.
In the code window at 0x4800 i see that the debugger programmed
the default values.
Then i used RFlasher to program the hex file to the chip.
After reading the flash memory of the chip i see at 0x4800 my
option bytes.

How can i attach files in a post?

Best Regards,

cs

+1
0
-1
March 12, 2009 - 10:01am
Raisonance Support Team

Hi,

Are you using the STM8S103K2 or the STM8S103K3?

The patch I sent is only for the STM83S103K3. I don't expect it to work on the K2. Please confirm and if needed I will send you a patch that also handles the K2.

Best Regards,

Vincent

+1
0
-1
March 12, 2009 - 10:20am
Guest

Hi,

i am using the STM8S103K3T6C$U1

Best Regards,

cs

+1
0
-1
March 13, 2009 - 6:31pm
Raisonance Support Team

Hi,

I can reproduce this problem, but I will need the intervention of some colleagues to solve it, so I cannot send you a patch before next week.

Thank you for reporting the issue.

Best Regards,

Vincent

+1
0
-1
March 17, 2009 - 2:06pm
Raisonance Support Team

Hi,

We have corrected the problem, but I will not be able to make a simple patch for fixing it, as it spreads on a lot of files. :(

Fortunately, the next release of Ride7 and RKit-STM8 is for next week, so you will not have to wait very long. ;)

Watch out for it on our website.

Best Regards,

Vincent