2018-07-31 04:43 PM
Hi there,
I'm migrating to STM32F103VC or similar from embedded Arduino/Teensy MCU's (Atmega328P and MK20DX256). My IDE (PlatformIO Atom) supports several ST Micro's out of the box, but I have a few questions around implementation that I haven't been able to answer from the documentation so far.
Here are my questions:
I'm attracted to these STM32 products because I understand they come with a bootloader onboard and can be programmed via USB directly, which jumps a few of the hurdles with other brand MCU's.
Many thanks in advance !
2018-07-31 05:56 PM
Bootloader in F105, 107 has the USB option.
2. Yes there's an appnote for h/w designs with USB. Hope someone can find it (I've lost the bookmark after the forum re-haul).
3. No new names, just flash and eeprom. Older chips have only flash, some newer STM32L have eeprom as well.
-- pa
2018-07-31 06:11 PM
AN3156 covers the USB DFU mode
https://www.st.com/en/development-tools/stsw-stm32080.html
2018-08-01 06:36 AM
DFU is not to be confused with USB host/peripheral functionality, I see. I'll do some reading up on the code required to read/write flash - I'm very accustomed to the ease with which the Arduino framework reads/writes the onboard EEPROM.
Thanks, that's helpful.
A further question, if I may..
The models that support the DFU have a lot of other features I don't need, and are a lot more expensive (thinking production quantity here). Is there a simple USB programmer chip I could install (that you could recommend) to make it field programmable with only a USB lead but still able to talk to most IDE's ? Perhaps ironically, the chip ST Micro use for their ST-Link is the F103.. Do they publish the bootloader installed on that?
Thanks again !
2018-08-01 11:42 AM
(2) The document is AN4879 "USB hardware and PCB guidelines using STM32 MCUs"
-- pa
2018-08-01 11:54 AM
> Is there a simple USB programmer chip I could install (that you could recommend) to make it field programmable with only a USB lead
Why do you insist on programming only with USB? ST-LINK or compatible debugger devices are cheap and reliable, great for field servicing (unless you have security concerns).
-- pa
2018-08-01 03:50 PM
Hi Pavel,
The reason I'm so keen on USB is that the end user will need to be able to update it too. I'm happy to use JTAG or any other programmer in the workshop, but that doesn't help my clients.
Many thanks..
2018-08-02 05:16 AM
Then the only option for F103 is custom USB updater, with DFU or virtual serial (CDC) interface.
-- pa