MUFF WIGGLER Forum Index
 FAQ & Terms of UseFAQ & Terms Of Use   Wiggler RadioMW Radio   Muff Wiggler TwitterTwitter   Support the site @ PatreonPatreon 
 SearchSearch   RegisterSign up   Log inLog in 
WIGGLING 'LITE' IN GUEST MODE

STM32 programmer for Mutable DIY
MUFF WIGGLER Forum Index -> Music Tech DIY Goto page 1, 2  Next [all]
Author STM32 programmer for Mutable DIY
dogmeat
Hi
I intend to DIY a few mutable modules. The only issue i have is selecting the STM32 programmer. What have you people used? I found this one:

http://www.ebay.com/itm/ST-Link-V2-STM8-STM32-Emulator-Mini-Metal-Shel l-Downloader-Programmer-Unit-SOZ-/171796349311?hash=item27ffdc417f

would that, paired with an adapter for those micro headers work?

Thanks!!!
av500
this one should work just fine, it's STLINK V2.0 compatible.

There is only one caveat on this one, the RST line is not the SWD reset line but the SWIM (needed for e.g. STM8) reset line. on mine I soldered a wire to have SWD reset in parallel on the RST line because for some STM32F030 I seem to need the reset line.

another option is to get a cheap nucleo board, it comes with STLINK V2.1 and you can even cut away the rest of the board to get a an almost as small programmer.
dogmeat
thanks av500, i will go with the one i found, and do your hack if i need to. honestly, i don't know what SWD and SWIM reset lines are, i never worked with STMs, but will look into the docs for STM32's
av500
dogmeat wrote:
thanks av500, i will go with the one i found, and do your hack if i need to. honestly, i don't know what SWD and SWIM reset lines are, i never worked with STMs, but will look into the docs for STM32's


SWD and SWIM are two different debug interfaces, SWD is used for the STM32 line of chips and SWIM for the STM8 line. both have a reset line that the debugger can pull to get the CPU into reset. normally SWD can work without it, using only the SWD CLOCK and DATA lines, but if you e.g. use the same pins for other functions, you need to assert RESET to be able to debug/program the chip. For some reason, on the original STLINK, it's not the same pin used for both functions and the Chinese clones bring out the SWIM reset only because for SWIM it's mandatory.

but it's easily fixed smile

dogmeat
ah, i see...they bgasically function as any reset pin on other microcontrollers but they cannot agree whether it is mandatory for STM32s smile
i am thinking of following a recommendation olivier gave on some thread, to use MI modules as advanced ardcores (ARMcore? smile ), but i will need to go through all the intricacies of the STM32 platform. only used ATMegas, arduino and to a lesser extent TI's Tiva C previously. so this should be a nice experience smile
thanks!!!
screaming goo yo screaming goo yo screaming goo yo screaming goo yo
av500
dogmeat wrote:
ah, i see...they bgasically function as any reset pin on other microcontrollers but they cannot agree whether it is mandatory for STM32s smile
i am thinking of following a recommendation olivier gave on some thread, to use MI modules as advanced ardcores (ARMcore? smile ), but i will need to go through all the intricacies of the STM32 platform. only used ATMegas, arduino and to a lesser extent TI's Tiva C previously. so this should be a nice experience smile
thanks!!!
screaming goo yo screaming goo yo screaming goo yo screaming goo yo


if you are familiar with TI TIVA which is an ARM Cortex M4, then going to STM32 is not a big step. I use STM32 for all my diy synth stuff:

https://plus.google.com/+VladimirPantelic/posts/9aaPxB7cTP3 screaming goo yo
gbiz
Given the issues other people have had with ebay ST-Link clones, i'd suggest you look at getting a genuine ST ST-Link, & the Sparkfun adapter board. It might cost you a bit more, but they're known to work.
dogmeat
WAAT?!?!? you are local...and a namesake?!?!? grin
av500 wrote:


if you are familiar with TI TIVA which is an ARM Cortex M4, then going to STM32 is not a big step. I use STM32 for all my diy synth stuff:

https://plus.google.com/+VladimirPantelic/posts/9aaPxB7cTP3 screaming goo yo


@gbiz yeah, the few dollar price seems a bit problematic, but i already ordered it, if it goes great, if not, not much harm, i'll order the official ST-Link. thanks!
av500
dogmeat wrote:
WAAT?!?!? you are local...and a namesake?!?!? grin
av500 wrote:


if you are familiar with TI TIVA which is an ARM Cortex M4, then going to STM32 is not a big step. I use STM32 for all my diy synth stuff:

https://plus.google.com/+VladimirPantelic/posts/9aaPxB7cTP3 screaming goo yo


@gbiz yeah, the few dollar price seems a bit problematic, but i already ordered it, if it goes great, if not, not much harm, i'll order the official ST-Link. thanks!


before you buy an expensive STLINK, buy a $10 Nucleo board, it comes with one and a spare STM32
old gregg
I've bought a discovery board and it comes with a st link as well. It's maybe a bit more bulky and not very as convinient as a small programmer but it does the job.

Although I can't program that bloody stm32f103 chinese board lol
dogmeat
which nucleo should i get? there are 5 different ones on the st's site smile

EDIT: i need to code STM32F405RGT6 and STM32F103CBT6


av500 wrote:
dogmeat wrote:
WAAT?!?!? you are local...and a namesake?!?!? grin
av500 wrote:


if you are familiar with TI TIVA which is an ARM Cortex M4, then going to STM32 is not a big step. I use STM32 for all my diy synth stuff:

https://plus.google.com/+VladimirPantelic/posts/9aaPxB7cTP3 screaming goo yo


@gbiz yeah, the few dollar price seems a bit problematic, but i already ordered it, if it goes great, if not, not much harm, i'll order the official ST-Link. thanks!


before you buy an expensive STLINK, buy a $10 Nucleo board, it comes with one and a spare STM32
av500
dogmeat wrote:
which nucleo should i get? there are 5 different ones on the st's site smile

EDIT: i need to code STM32F405RGT6 and STM32F103CBT6



they should all have the same STLINK v2.1, so why not the cheapest you can get? then you can cut off the target and you have compact programmer (and still use it with the target via jumper wires). as a bonus feature, STLINK v2.1 exposes a serial port, so if you need a UART for debug inout/output, that can run that over the same USB connection in parallel.

that's how I use mine, notice the UART TX/RX lines connected:

dogmeat
great! they are all $10 if the cheapo chinese one doesn't work i'll get it (well even if it does, this thing seems useful to have) and there is one Nucleo with Series F4 STM32, which is high performance, and used in MI Clouds and Elements, so it seems like a nice start, all of the other Nucleos are "Mainstream" as ST declares them
av500
old gregg wrote:

Although I can't program that bloody stm32f103 chinese board lol


which board is that?
insula
dogmeat wrote:
Hi
I intend to DIY a few mutable modules. The only issue i have is selecting the STM32 programmer. What have you people used? I found this one:

http://www.ebay.com/itm/ST-Link-V2-STM8-STM32-Emulator-Mini-Metal-Shel l-Downloader-Programmer-Unit-SOZ-/171796349311?hash=item27ffdc417f

would that, paired with an adapter for those micro headers work?

Thanks!!!


this is the programmer that i use:

http://www.dfrobot.com/index.php?route=product/product&keyword=ftdi&pr oduct_id=147#.VfmnZZ3tmko


will works almost with all MI modules, less yarns for sure.. and another one that i don't remember now, only a few has only Jtag interface.

I already program braids and clouds

wink
dogmeat
insula wrote:
dogmeat wrote:
Hi
I intend to DIY a few mutable modules. The only issue i have is selecting the STM32 programmer. What have you people used? I found this one:

http://www.ebay.com/itm/ST-Link-V2-STM8-STM32-Emulator-Mini-Metal-Shel l-Downloader-Programmer-Unit-SOZ-/171796349311?hash=item27ffdc417f

would that, paired with an adapter for those micro headers work?

Thanks!!!


this is the programmer that i use:

http://www.dfrobot.com/index.php?route=product/product&keyword=ftdi&pr oduct_id=147#.VfmnZZ3tmko


will works almost with all MI modules, less yarns for sure.. and another one that i don't remember now, only a few has only Jtag interface.

I already program braids and clouds

wink


are you telling me that you managed to program STMs using a basic FTDI usb-to-serial converter??? how? did you use blank STM32 chips or did you do it on bought MI modules?
insula
dogmeat wrote:
insula wrote:
dogmeat wrote:
Hi
I intend to DIY a few mutable modules. The only issue i have is selecting the STM32 programmer. What have you people used? I found this one:

http://www.ebay.com/itm/ST-Link-V2-STM8-STM32-Emulator-Mini-Metal-Shel l-Downloader-Programmer-Unit-SOZ-/171796349311?hash=item27ffdc417f

would that, paired with an adapter for those micro headers work?

Thanks!!!


this is the programmer that i use:

http://www.dfrobot.com/index.php?route=product/product&keyword=ftdi&pr oduct_id=147#.VfmnZZ3tmko


will works almost with all MI modules, less yarns for sure.. and another one that i don't remember now, only a few has only Jtag interface.

I already program braids and clouds

wink


are you telling me that you managed to program STMs using a basic FTDI usb-to-serial converter??? how? did you use blank STM32 chips or did you do it on bought MI modules?



I build by myself the modules, using a blank chip.. so yes. The STM32 can be burned via FTDI (JP3 in the schematic)




remember to also press RST and SYSBOOT buttons

nanners
AlanP
also, do NOT put 5V into JP3's power pin... don't ask how I found this out d'oh!
elcoco
Hi guys, this is my first time programming a microprocessor and I have a few questions. Would the Nucleo board be the only thing I need to buy to program the STM32F103CBT6? Also how do I connect the chip to the board, to I need to desolder the one that's in the board and solder mine on?
av500
elcoco wrote:
Hi guys, this is my first time programming a microprocessor and I have a few questions. Would the Nucleo board be the only thing I need to buy to program the STM32F103CBT6? Also how do I connect the chip to the board, to I need to desolder the one that's in the board and solder mine on?


see the 2 jumpers on the top of the nucleo, next to the crystal. removing these will disconnect the SWCLK and SWDIO lines from the CPU on your nucleo. then you can use the "SWD" connector to access SWCLK, SWDIO and GND of course (there is also NRST there, but most likely you dont need that). if your target board has its own power supply, that's all you need, otherwise you can also pickup 5V or 3.3V from the nucleo to power your board.

you can see the pinout of the SWD connector from the schematics here:

http://www.st.com/st-web-ui/static/active/en/resource/technical/layout s_and_diagrams/schematic_pack/nucleo_64pins_sch.zip
elcoco
Would the target board be my braids board with the stm32 chip soldered in or do I need a separate board to program the chip with?
av500
elcoco wrote:
Would the target board be my braids board with the stm32 chip soldered in or do I need a separate board to program the chip with?


looking at Braids schematics, it seems it can be "flashed" in 2 ways, by serial bootloader when you press the button and by JTAG/SWD via the 10pin header. in both cases it can be done with the chip soldered.

but I am no mutable expert, so please refer to their forums for more detailed help around that.
gbiz
av500 wrote:
elcoco wrote:
Would the target board be my braids board with the stm32 chip soldered in or do I need a separate board to program the chip with?


looking at Braids schematics, it seems it can be "flashed" in 2 ways, by serial bootloader when you press the button and by JTAG/SWD via the 10pin header. in both cases it can be done with the chip soldered.

but I am no mutable expert, so please refer to their forums for more detailed help around that.


If you go to the Mutable forums asking for DIY help, you'll get sent back here. thumbs up

To answer the original question, the Braids is the target & yes you program it in-situ.

A tip. You don't need all the components installed on the board in order to flash the MCU. All the SMD components & the headers is fine. Leave off the through hole components like the pots & jacks. If you need to give the board a close visual inspection with a Loupe, it's much easier to do with it partially populated. When you upload the firmware, you'll see from the openocd output if it's been written sucessfully.

There's a dedicated thread to Braids here https://www.muffwiggler.com/forum/viewtopic.php?t=120940. Take a read of that. Much of this is already answered in there.
av500
gbiz wrote:

If you go to the Mutable forums asking for DIY help, you'll get sent back here. thumbs up


as said, I know nothing about mutable smile
gbiz
av500 wrote:
gbiz wrote:

If you go to the Mutable forums asking for DIY help, you'll get sent back here. thumbs up


as said, I know nothing about mutable smile


indeed hihi
MUFF WIGGLER Forum Index -> Music Tech DIY Goto page 1, 2  Next [all]
Page 1 of 2
Powered by phpBB © phpBB Group