cancel
Showing results for 
Search instead for 
Did you mean: 

How to program WIO-5E mini (Seeed) using ST-LINK/V2 mini (Vaweshare)

markpow
Associate III

I bought ST-LINK/V2 from a certified reseller, and I have WIO-5E mini with STM32WL5JC from [Seeed.com](https://Seeed.com) on the board. This WIO-5E was already programmed by another ST-LINK/V2. I connected WIO-5E to ST-LINK as required. I want to reprogam WIO-5MINI using this programator. But STM32Programmer answered:

0693W00000YA1JoQAL.pngWhat should I do so STM32Programmer will see STM32WL5CJ from the WIO-5E mini board?

21 REPLIES 21

How is this connected? Like before?

VCC 3.3V

GND

SWDIO

SWCLK

NRST

If NRST is connected then "connect under reset" will work without you needing to press a button.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
markpow
Associate III

I have only four wires: VCC 3,3V, SWDIO, SWCLK, and GND on ST-LINK/V2. They all are connected as required to the WIO-5E mini. I don't have NRST wire.

I can't.

0693W00000YA2oIQAT.pngWhat should I do to upgrade the firmware?

@Peter BENSCH​ 

I upgraded the firmware with a stupid trick. I unplug the USB cable from ST-LINK, count for up to 6 sec, plug the USB into it, count again for up to 6 sec, and press on upgrade firmware button.

0693W00000YA5GoQAL.pngFirmware upgraded to the requested version.

But still can't connect to the WIO-5E mini. Still the same message:

Error: No STM32 target found!

I can connect to WIO-5E only when pressing and holding the reset button. When I release this button, I get:

18:30:50 : Error: Unable to get core ID

 18:30:50 : Error: Unable to get core ID

 18:30:50 : Error: Unable to get core ID

 18:30:50 : Warning: Connection to device 0x497 is lost

 18:30:51 : Disconnected from device.

Maybe this information will be helpful. Previously downloaded code into WIO-5E sill running, red diode blinks every one second. When I press the reset button, the diode stops blinking.

AScha.3
Chief II

>I upgraded the firmware with a stupid trick

No. thats what you should do, to "start in update mode " .

> Previously downloaded code into WIO-5E sill running,

AAA, new info. It was working before ??

so just look, what you set in option bytes. there is something , that disables SWD , i suppose.

or in your program -> using the SWD+SWC pins for something, change their mode;

+ you set in Cube : SWD ?

0693W00000YA8amQAD.png

If you feel a post has answered your question, please click "Accept as Solution".
markpow
Associate III

@AScha.3​ ​ Here is my view:

0693W00000YAA2IQAX.pngIt looks completely different from your's view.

But I can't understand the relation between the configuration of an application and trying to connect ST-LINK to WIO-5E mini (with STM32WL5JC chip on the board)

AScha.3
Chief II

ok, (pic was from F072 cpu) , on your WL5x cpu the relevant pins can be set to different functions, if you want SWD debug connect, you must set PA13 + PA14 to SWD+SWC function. otherwise they will do, whatever is set to them.

if you just want flash/load program, maybe you should try bootloader mode and flash this way.

If you feel a post has answered your question, please click "Accept as Solution".
AScha.3
Chief II

so - what you did ? already killed the firmware ?

0693W00000YAAZ2QAP.png

If you feel a post has answered your question, please click "Accept as Solution".
markpow
Associate III

Yes, the firmware was cleared, and the protecion level was set up to AA. After that, I might upload code (.hex) to WIO-5 min. In the beginning, I would ask the chip using AT commands. After clearing the firmware, it's obvious that I can't ask with AT command. But I might program this chip. I saw that WIO-5 contacts to Chirpstack gateway.

AScha.3
Chief II

so...i hope, you know, what you are doing. 🙂

  • in CubeProgrammer, set software reset
  • connect (under reset - press reset button, then 'connect') . works ? can load program ?
  • or try bootloader: press reset, press boot, release reset , then release boot. now should connect in bootloader, select in Cubeprogrammer not STlink, but rs232 or usb - whatever your chip can do (read manual!) and for rs232 need ie rs232 - ttl adapter to connect to rs232 rx-tx on chip pins.

maybe, you have to set option bytes , or set swd on start of your program, to have it always available (to connect by STlink -> SWD ) and debug or load program.

If you feel a post has answered your question, please click "Accept as Solution".