Author Topic: STM32F103 any good?  (Read 57822 times)

0 Members and 1 Guest are viewing this topic.

Offline newbrain

  • Super Contributor
  • ***
  • Posts: 1719
  • Country: se
Re: STM32F103 any good?
« Reply #75 on: November 17, 2015, 04:52:11 pm »
Why LC? Why a 100n cap? Most of the time, when I open schematic with mcu, i see L, some C i didn't expect, and bunch of other piece. But when i look at the datasheet, for a typical/minimum/recommended design, they just put most of the time a resistor between the mcu reset and Vdd. (I am not talking about a particular mcu, but in general). Did I miss an application note, an interesting document, or a book like "How to electrically plug an mcu"? It would be interesting if someone here could guide me to the right resource to learn those subtlety or explain it here.

Pretty much standard practice: LC as a low pass filter to reduce noise passed from the digital side of the supply (VDD) to the analog one (VDDA), a cap across the reset pushbutton to provide a minimum of debouncing.
Example of LC (a ferrite bead, actually) in the picture, cropped from a Discovery board schematic.
Nandemo wa shiranai wa yo, shitteru koto dake.
 

Offline asgard20032

  • Regular Contributor
  • *
  • Posts: 184
Re: STM32F103 any good?
« Reply #76 on: November 17, 2015, 05:07:29 pm »
Why LC and not RC? Which L to choose?
 

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: STM32F103 any good?
« Reply #77 on: November 17, 2015, 06:55:12 pm »
A reset switch doesn't need debouncing!

IME a lot of EEs have a rote method of design, often under the guide of "best practice", which leads to overcomplicated design and unnecessary components.
Bob
"All you said is just a bunch of opinions."
 

Offline old gregg

  • Regular Contributor
  • *
  • Posts: 130
  • Country: 00
Re: STM32F103 any good?
« Reply #78 on: December 27, 2015, 09:51:56 pm »
I bring life back to the thread.

I've this board that I'd like to use for a small thing


Some people had experience with this board ?
I have the board,  it works.  can someone provides a schematic?
thanks

I uploaded the schematic.
 

Offline Brutte

  • Frequent Contributor
  • **
  • Posts: 614
Re: STM32F103 any good?
« Reply #79 on: December 28, 2015, 04:37:08 pm »
Why DP pullup is 4k7?? And Boot0 is just flapping in the breeze?
 

Offline Bruce Abbott

  • Frequent Contributor
  • **
  • Posts: 627
  • Country: nz
    • Bruce Abbott's R/C Models and Electronics
Re: STM32F103 any good?
« Reply #80 on: December 28, 2015, 06:57:04 pm »
Why DP pullup is 4k7?? And Boot0 is just flapping in the breeze?
The standard D+ pull-up value is 1.5k to +3.3V. However in this case the resistor pulls up to +5V so the value should be higher. This board does not have zener protection on D+ so 4.7k is sufficient, and since the resistor is not switched out after USB negotiation the less current it injects the better. Crude, but it works!

BOOT0 is connected through R3 to pin 44 of the STM32. The jumper sets it to GND or +3.3V.
« Last Edit: December 28, 2015, 06:59:16 pm by Bruce Abbott »
 

Offline ea_man

  • Contributor
  • Posts: 23
  • Country: it
Re: STM32F103 any good?
« Reply #81 on: December 28, 2015, 09:32:54 pm »
Why DP pullup is 4k7?? And Boot0 is just flapping in the breeze?
You are lucky: mine came with 10K and I had to solder a new one.
Weird thing is that now I have to use a USB HUB in order to upload, I'put a ~1.5k ohms resistor in that.

With 4.7k resistor does it work ok, enumeration and upload?
 

Offline Brutte

  • Frequent Contributor
  • **
  • Posts: 614
Re: STM32F103 any good?
« Reply #82 on: December 28, 2015, 09:54:16 pm »
The standard D+ pull-up value is 1.5k to +3.3V. However in this case the resistor pulls up to +5V so the value should be higher.
This design is a disaster. Looks like the USB spec has not been translated to Chinese yet.

Quote
BOOT0 is connected through R3 to pin 44 of the STM32. The jumper sets it to GND or +3.3V.
Ahh, now I can see that those are jumpers and select boot modes. PB2 is not routed externally.

Thanks for clarifying that.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: STM32F103 any good?
« Reply #83 on: December 31, 2015, 04:33:15 pm »
Quote
for historical reasons unknown to me became very popular in china some years ago.

It is one of the first CM3 chips that are so versatile at such a low price:

1) aside from the typical peripherals, it has DAC, lots of timers, DMA, CAN / USB, and built-in random number generator.
2) undocumented features.
3) good availability + form factor.

It is a little bit slow by today's standards but for many jobs it is fast enough.

Because of that, it is one of the very first cloned STM32F chips as well.
================================
https://dannyelectronics.wordpress.com/
 

Offline MagicSmoker

  • Super Contributor
  • ***
  • Posts: 1408
  • Country: us
Re: STM32F103 any good?
« Reply #84 on: December 31, 2015, 05:45:44 pm »
A reset switch doesn't need debouncing!

True, but the capacitor from !RESET to ground isn't for debouncing, it's for preventing spurious assertion from noise. Furthermore, a cap on reset costs very little, while the consequences of an unintended reset range from annoying to catastrophic, so there's no rational argument for leaving it off.

That said, I do agree with your general premise that most EEs seem to make things needlessly complex for the task at hand.
 

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: STM32F103 any good?
« Reply #85 on: December 31, 2015, 06:12:36 pm »
Yes, with hindsight (and some reading of data sheet  :-[) I would change that opinion - Reset is the only switch that needs a cap :).

I was recently reviewing a debug board we created at work, and 95% of it's functionality I've never used, and of the 5% there were other simpler says to do it. Plus the mounting by the mechanical guy was the worst design I have ever used. All it needed was a 10 pin JTAG IDC connector, would have been fine. I gave a colleague a copy of the "what the customer wanted" cartoon, he thought it was amusing but showed no signs of getting the message!

I concede this may say more about the ill-advised over-engineering we do at our company than the state of the industry in general.
Bob
"All you said is just a bunch of opinions."
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: STM32F103 any good?
« Reply #86 on: January 01, 2016, 12:45:43 pm »
Quote
the capacitor from !RESET to ground isn't for debouncing, it's for preventing spurious assertion from noise.

It is also a "power-good" indicator - to create a power-on delay.
================================
https://dannyelectronics.wordpress.com/
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6190
  • Country: us
Re: STM32F103 any good?
« Reply #87 on: January 01, 2016, 03:53:03 pm »
What kind of bootloader does this board use?  Is it a stock preprogrammed  bootloader that comes with the MCU?
 

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: STM32F103 any good?
« Reply #88 on: January 01, 2016, 06:33:32 pm »
If I recall correctly, there is only the built-in STM serial bootloader.
Bob
"All you said is just a bunch of opinions."
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: STM32F103 any good?
« Reply #89 on: January 01, 2016, 09:04:21 pm »
Most parts have bootloaders. Some only for UART, some also have CAN or USB. These are ROM bootloaders, you can always add your own through the ARM SWD interface.
Especially on these parts with their variety you should consult the manual before assuming that it will have bootloaders.
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6190
  • Country: us
Re: STM32F103 any good?
« Reply #90 on: January 01, 2016, 09:36:07 pm »
Most parts have bootloaders. Some only for UART, some also have CAN or USB. These are ROM bootloaders, you can always add your own through the ARM SWD interface.
Especially on these parts with their variety you should consult the manual before assuming that it will have bootloaders.

I am using an NXP Arm MCU that comes stock with a USB virtual disk bootloader. It's very handy because no software is required to upload, just file copy. Would like to try a similar one from ST if available.
 

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: STM32F103 any good?
« Reply #91 on: January 01, 2016, 09:48:13 pm »
I am using an NXP Arm MCU that comes stock with a USB virtual disk bootloader. It's very handy because no software is required to upload, just file copy. Would like to try a similar one from ST if available.

That is a nice feature, but I haven't seen it on any other MCUs so far - it's great for hobbyists, maybe not so useful in a commercial environment?
Bob
"All you said is just a bunch of opinions."
 

Offline neslekkim

  • Super Contributor
  • ***
  • Posts: 1305
  • Country: no
Re: STM32F103 any good?
« Reply #92 on: January 01, 2016, 10:26:10 pm »
The nucleo's from st have it, but that is maybe custom bootloader?
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6190
  • Country: us
Re: STM32F103 any good?
« Reply #93 on: January 01, 2016, 10:35:43 pm »
The nucleo's from st have it, but that is maybe custom bootloader?

One important feature in those MCU boards is the ability to clone them. Not to sell competing products but for application specific custom PCBs that are based on the same MCU design. If ST provides an after market bootloader, it's still very useful.
 

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: STM32F103 any good?
« Reply #94 on: January 01, 2016, 10:53:43 pm »
The nucleo's from st have it, but that is maybe custom bootloader?

I think all the Nucleo boards have a secondary MCU which provides the USB disk programming method for Mbed, as well as a JTAG interface via USB (ST-LINK).  STM have not published the source code for the firmware AFAIK.

Bob
"All you said is just a bunch of opinions."
 

Offline Brutte

  • Frequent Contributor
  • **
  • Posts: 614
Re: STM32F103 any good?
« Reply #95 on: January 01, 2016, 11:04:51 pm »
Quote
The nucleo's from st have it
The nucleo st-link V2-1 USB mass storage class feature is not a bootloader but a programmer (it runs on a device that is external to the target). A bootloader is the name of the code that resides inside of the target that is being programmed.
The st-link does come with a USB bootloader (that allows upgrading st-link itself) however it is not a mass storage class.

BTW, nucleo 64 do not provide target USB receptacle.
 

Offline poorchava

  • Super Contributor
  • ***
  • Posts: 1672
  • Country: pl
  • Troll Cave Electronics!
Re: STM32F103 any good?
« Reply #96 on: January 01, 2016, 11:14:55 pm »
The ST-Link mass storage component contains only some advertising and propaganda. As a matter if fact I recall reading somewhere that both versions of ST-Link use some side channel in disk management protocol to talk to PC. I recall having huge problems with V1 under Win7.

I think all newer STM32s have bootloaders over USB,  UART and some other interface (SPI iirc). Not sure about F103 as it is a pretty old part. I think it has UART bootloader.

Sent from my HTC One M8s using Tapatalk.

I love the smell of FR4 in the morning!
 

Offline Bruce Abbott

  • Frequent Contributor
  • **
  • Posts: 627
  • Country: nz
    • Bruce Abbott's R/C Models and Electronics
Re: STM32F103 any good?
« Reply #97 on: January 02, 2016, 03:29:48 am »
Not sure about F103 as it is a pretty old part. I think it has UART bootloader.
Yes, it has the serial bootloader. To use it you just need a TTL serial adapter and ST's Flash Loader Demonstrator. This has a command line version which can be run from a batch file.

I am using the vcc-gnd dev board that old gregg posted the schematic for. I modified the batch file in the "1 dollar 1 minute" thread so that an asm source code file can be 'drag-and-dropped' onto it. It takes less than a second to assemble, download and run a program. For debugging I use Hyperterminal. 

To make a self-contained environment for each project I put the arm assembler and flash load programs in subdirectories. I just copied over the essential files so the whole lot only takes up 4.8MB on disk.

The attachment below includes my batch file and source code for an LED blink program that works on the vcc-gnd board. The batch file is set to use COM5. If you use a different port then change the number '5' in the stmflashloader parameter '--pn 5' to the number of your com port.
 

Offline old gregg

  • Regular Contributor
  • *
  • Posts: 130
  • Country: 00
Re: STM32F103 any good?
« Reply #98 on: February 26, 2016, 02:52:57 pm »
that's great Bruce, thank you. I'll check it out.

I should add the 2 pull resistor on the programming buss required. It won't work without if programmed via the st-link of the discovery board.

At the moment I've terrible experience with the ADC, it simply doesn't work. It enters the IRQ_handler fine but it seems that the adc pin isn't mapped to the ADC or something.

 Although my understanding goes nicely on the F4 discovery board, the Vcc-Ground board is very frustating.
 

Offline Brutte

  • Frequent Contributor
  • **
  • Posts: 614
Re: STM32F103 any good?
« Reply #99 on: March 01, 2016, 10:05:49 pm »
but it seems that the adc pin isn't mapped to the ADC or something.


I suggest that you should start with examples provided by ST instead of reinventing the wheel. Besides, all STM32F103 chips have internal temperature sensor so it could be a good starting point for verifying your theory.

And about the bootloader - the chip has USB device peripheral and ST provides DFUse.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf