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  
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
elcoco
Thanks a lot guys, I was looking around for a clear answer but couldn't find one.
gbiz
If you're after tips, it's also worth looking through the Clouds & the Mutable unsuccessful builds threads:

https://www.muffwiggler.com/forum/viewtopic.php?t=133272
https://www.muffwiggler.com/forum/viewtopic.php?t=138926


I'll stick by what i said back there ^^^. The people who've had the least hassle flashing these modules use a genuine ST STLink-V2 & the Sparkfun breakout board. smile
GaryInHuaHin
I'm working with Peaks now. According to the schematic, it's different from Braids, having just GND, RX, and TX connected.

Will this affect programming by FTDI from a Discovery board using STLink on Windows?

And what is my connection? Straight pin-to-pin or do I flip RX and TX?

Thanks for your patient help!
bennelong.bicyclist
GaryInHuaHin wrote:
I'm working with Peaks now. According to the schematic, it's different from Braids, having just GND, RX, and TX connected.

Will this affect programming by FTDI from a Discovery board using STLink on Windows?

And what is my connection? Straight pin-to-pin or do I flip RX and TX?

Thanks for your patient help!


Read this page: http://mutable-instruments.net/modules/peaks/open

Does the Discovery board support FTDI USB to serial? I've always used an FTDI Friend as recommended on the page linked to above, or a genuine ST-Link v2 for JTAG. Both just worked.
av500
bennelong.bicyclist wrote:
GaryInHuaHin wrote:
I'm working with Peaks now. According to the schematic, it's different from Braids, having just GND, RX, and TX connected.

Will this affect programming by FTDI from a Discovery board using STLink on Windows?

And what is my connection? Straight pin-to-pin or do I flip RX and TX?

Thanks for your patient help!


Read this page: http://mutable-instruments.net/modules/peaks/open

Does the Discovery board support FTDI USB to serial? I've always used an FTDI Friend as recommended on the page linked to above, or a genuine ST-Link v2 for JTAG. Both just worked.


the Discovery board has a builtin STLINK v2, but of course you can also jumper it to serial boot and connect an FTDI if you want that...
GaryInHuaHin
bennelong.bicyclist wrote:


Does the Discovery board support FTDI USB to serial? I've always used an FTDI Friend as recommended on the page linked to above, or a genuine ST-Link v2 for JTAG. Both just worked.


It does. I'm trying to use the hardware I have as I'm Thailand & buying anything new takes time & extra cost. I use the Discovery with 4ms already so I know it basically works.

I'll do the experiment of connecting. I can't imagine any harm occurring. Thanks much for help!
Morpher
I am about to build a Clouds right now, but I have no clue (yet) on how to program the chips etc.. Dead Banana

Can you put the firmware on the chips before soldering it onto the circuit? Or is that not true?
That would be sweet because then I could try and find someone who can help me with the chips while building it at the same time.. (hint hint help )
lasesentaysiete
Morpher wrote:

Can you put the firmware on the chips before soldering it onto the circuit? Or is that not true?

yes, it can be done, but I doubt you'd want to invest in the tools necessary to do it. Easier to flash in circuit.
av500
Morpher wrote:
I am about to build a Clouds right now, but I have no clue (yet) on how to program the chips etc.. Dead Banana

Can you put the firmware on the chips before soldering it onto the circuit? Or is that not true?
That would be sweet because then I could try and find someone who can help me with the chips while building it at the same time.. (hint hint help )


if you solder the STM to the PCB and the few components around it that are needed to power it then you can program it first before adding all the other stuff. and you can be sure that you are not soldering all your precious parts to a board with a chip you cant talk to.
Morpher
lasesentaysiete wrote:

yes, it can be done, but I doubt you'd want to invest in the tools necessary to do it. Easier to flash in circuit.


av500 wrote:

if you solder the STM to the PCB and the few components around it that are needed to power it then you can program it first before adding all the other stuff. and you can be sure that you are not soldering all your precious parts to a board with a chip you cant talk to.


Ah ok! So it could be possible.. hmmm.....
It's just that I was thinking about sourcing pre-programmed chips and add them at the end..
I think that would be the fastest method for now, but I will definitely dive into programming these kinds of chips so I don't have to ask others for help in the future..
lasesentaysiete
if you manage to get the module built, flashing is relatively easy. Not really worth "outsourcing".
av500
Morpher wrote:
lasesentaysiete wrote:

yes, it can be done, but I doubt you'd want to invest in the tools necessary to do it. Easier to flash in circuit.


av500 wrote:

if you solder the STM to the PCB and the few components around it that are needed to power it then you can program it first before adding all the other stuff. and you can be sure that you are not soldering all your precious parts to a board with a chip you cant talk to.


Ah ok! So it could be possible.. hmmm.....
It's just that I was thinking about sourcing pre-programmed chips and add them at the end..
I think that would be the fastest method for now, but I will definitely dive into programming these kinds of chips so I don't have to ask others for help in the future..


$60 buys you a TQFP64 test socket that you can wire up to 3.3 and STLINK to preprogram the CPU.
billyhologram
bennelong.bicyclist wrote:
I've always used an FTDI Friend as recommended on the page linked to above, or a genuine ST-Link v2 for JTAG. Both just worked.

How long does it take to upload the firmware to a DIY MI module using these? I've understood that FTDI is slower, but what kind of difference are we talking about, ballpark?
jars
ive used a nucleo board to program an elements successfully but im having some trouble with braids. the st-link programming has never taken more than about 5 seconds. I already had a nucleo board, so I wanted to use that rather than buy an FTDI one.
Staticcharge
I'm just about to build a pair of plum audio apex modules, peaks clones. I see in earlier comments people have been using all sorts of devices to flash the firmware. I've got an FTDI interface can someone list the process? Assume I'm an idiot because I want to start from scratch and not trip myself up with information I already have.
Thanks all in advance.
defalut
Staticcharge wrote:
I'm just about to build a pair of plum audio apex modules, peaks clones. I see in earlier comments people have been using all sorts of devices to flash the firmware. I've got an FTDI interface can someone list the process? Assume I'm an idiot because I want to start from scratch and not trip myself up with information I already have.
Thanks all in advance.


Did you get a response, or solve it? I'm in a similar conundrum. I have I Basics (peaks with CV) which I have finished soldering mostly (still haven't figured out what t do with the boot and reset, to solder pins and use with jumpers or what).
But, I'm a n00b at the rest. I have a ftdi friend clone, but no idea of what to do now.
Staticcharge
defalut wrote:
Staticcharge wrote:
I'm just about to build a pair of plum audio apex modules, peaks clones. I see in earlier comments people have been using all sorts of devices to flash the firmware. I've got an FTDI interface can someone list the process? Assume I'm an idiot because I want to start from scratch and not trip myself up with information I already have.
Thanks all in advance.


Did you get a response, or solve it? I'm in a similar conundrum. I have I Basics (peaks with CV) which I have finished soldering mostly (still haven't figured out what t do with the boot and reset, to solder pins and use with jumpers or what).
But, I'm a n00b at the rest. I have a ftdi friend clone, but no idea of what to do now.

Sorry for the delay in response, I've not been monitoring this thread.
I bought an STLink v2 from mouser and use the ST utility. Flash the bootloader first then the firmware (using the HEX files) job done. No need for button pressing.
defalut
Staticcharge wrote:
defalut wrote:
Staticcharge wrote:
I'm just about to build a pair of plum audio apex modules, peaks clones. I see in earlier comments people have been using all sorts of devices to flash the firmware. I've got an FTDI interface can someone list the process? Assume I'm an idiot because I want to start from scratch and not trip myself up with information I already have.
Thanks all in advance.


Did you get a response, or solve it? I'm in a similar conundrum. I have I Basics (peaks with CV) which I have finished soldering mostly (still haven't figured out what t do with the boot and reset, to solder pins and use with jumpers or what).
But, I'm a n00b at the rest. I have a ftdi friend clone, but no idea of what to do now.

Sorry for the delay in response, I've not been monitoring this thread.
I bought an STLink v2 from mouser and use the ST utility. Flash the bootloader first then the firmware (using the HEX files) job done. No need for button pressing.


Thanks for your reply, I solved it using a ftdi friend clone and some tips on Facebook.
Staticcharge
Any experience with clouds?
I can't get the module to work correctly after flashing the firmware...hmm
It's a factory build but it had alternate firmware, I erased the MCU and flashed the bootloader then the main clouds.HEX but the module has no effect over the audio.
cnicht
Do any of the LEDs illuminate on power-on?
defalut
Staticcharge wrote:
Any experience with clouds?
I can't get the module to work correctly after flashing the firmware...hmm
It's a factory build but it had alternate firmware, I erased the MCU and flashed the bootloader then the main clouds.HEX but the module has no effect over the audio.


Did you ask me? If so, sorry for the late reply. Miley Cyrus
Anyway - no, i don´t have any Clouds experience. Not so much Mutable either in any case. Working on a few now though; Pique, Twist (warps) and nRings so i´ll have to get down and serious with the programming.
Trying to figure out why i´m having no success flashing the Pique´s.

Did you work it out? Since it´s a factory-built unit you may have mopre luck in the official mutable forums, it´s only the DIY´s that cant have help there - but you already know this i´m sure.
MUFF WIGGLER Forum Index -> Music Tech DIY  
Page 1 of 2
Powered by phpBB © phpBB Group