cancel
Showing results for 
Search instead for 
Did you mean: 

Can i program other STM8 chips with a STM8L152R8T6 Nucleo-64 board?

TConl.1
Associate II

I know you can with the 32 bit nucleo boards but is it possible with the STM8L152R8T6 Nucleo-64 board? My feeling is no because the SWIM protocol requires VDD, SWIO,GND and RESET pins which i cant see anywhere in the ST-link section of the STM8L152R8T6 Nucleo-64 boards schematic. Hopefully someone can tell me I'm wrong though.

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
WilkoL
Senior

Hello TConl.1,

I do not own a STM8_Nucleo so no, I did not have that working. And also I mistook the CN2 connector for SWIM, it is SWD.

But you should be able to use the STLink for other STM8 controllers, after all you can snap it off from the Nucleo. That means that the SWIM and NRST signals are on the narrow connections between the STLink and the target-board.

I took another look at the schematic and saw that those signals are not easily available on a connector. You will have to do some soldering to remove R9 and R16, SWIM and NRST then are no longer connected to the STM8 on the target-board and you can use them for an external mcu. Not very nice from ST...

Then I read some confusing things about this STLink.

On page 13 of the manual they say:

"The embedded ST-LINK/V2-1 supports only SWIM for STM8L devices"

That seems to suggest that the STM8S and STM8A lines are not supported by it.

But a few lines further they say this:

"Features not supported on ST-LINK/V2-1: SWIM interface"

Do they mean that you cannot flash the STLink using SWIM? That is quite obvious as it is a STM32 mcu... Or what? You cannot use SWIM to program mcus?!!?

I have an original STLink V2 and some of those cheap Chinese clones, both types work for all STM8 and STM32 mcu's I have come across. Buy one of those and be done with it. Those Chinese things are just a few euros (dollars).

Wilko

View solution in original post

7 REPLIES 7
WilkoL
Senior
TConl.1
Associate II

Hi @Community member​  have you managed this? The SWIM protocal uses vdd, gnd, reset and swio lines but the pinout of that header you point to shows vdd, gnd, clk and swio. I tried with just the power and data lines but stvd couldnt find the target.

WilkoL
Senior

Hello TConl.1,

I do not own a STM8_Nucleo so no, I did not have that working. And also I mistook the CN2 connector for SWIM, it is SWD.

But you should be able to use the STLink for other STM8 controllers, after all you can snap it off from the Nucleo. That means that the SWIM and NRST signals are on the narrow connections between the STLink and the target-board.

I took another look at the schematic and saw that those signals are not easily available on a connector. You will have to do some soldering to remove R9 and R16, SWIM and NRST then are no longer connected to the STM8 on the target-board and you can use them for an external mcu. Not very nice from ST...

Then I read some confusing things about this STLink.

On page 13 of the manual they say:

"The embedded ST-LINK/V2-1 supports only SWIM for STM8L devices"

That seems to suggest that the STM8S and STM8A lines are not supported by it.

But a few lines further they say this:

"Features not supported on ST-LINK/V2-1: SWIM interface"

Do they mean that you cannot flash the STLink using SWIM? That is quite obvious as it is a STM32 mcu... Or what? You cannot use SWIM to program mcus?!!?

I have an original STLink V2 and some of those cheap Chinese clones, both types work for all STM8 and STM32 mcu's I have come across. Buy one of those and be done with it. Those Chinese things are just a few euros (dollars).

Wilko

TConl.1
Associate II

@Community member​  yeah the CN2 connector seems a bit useless - not sure how the SWD connections are any use to me.. Thanks for the info was hoping I was just missing something but it does seem like a real pain. The nucleo for some 32 bit boards seem to be much easier to use to program other boards but again seems to just be for the specific chip on the board it comes with.

I agree the information in that page is not overly clear but anyway I have an stlink on the way now.

Thanks for your help

Hi @Community member​ I have got my stlink but it is not going as smoothly as hoped, perhaps you could help with the connections.

I have cut the stlink off the nucleo board and connected a 9v psu to vin and gnd.

I've connected pin one (vdd) of the stlink to pin five on connector CN1.

I've connected pin two (swim) of the stlink to pin thirty seven on connector CN1.

I've connected pin three (gnd) of the stlink to pin nineteen on connector CN1.

I've connected pin four (reset) of the stlink to pin twenty three on connector CN1.

 Whenever I try to connect through stvd i get 'SWIM error [30006]: Comm init error: chip does not answer'

Hope you can help, thanks!

my bad had the pins the wrong way around on the stlink

:grinning_face: