-3
\$\begingroup\$

I have been playing around Arduino and wanted to make my own development board for a long time.

I have decided to use the STM32F103C8T6 microcontroller for this. But being relatively inexperienced in hardware design, I'm doubtful as to whether what I'm doing is correct.

My Eagle Design till now

The oscillator I've chosen would be an 8 MHz one with load capacitances 18 pF each. But I'm doubtful whether this will work. Please find the errors and give tips to me.

PS: As far as I know, this chip only has a USART. How do I go about implementing I²C, SPI, and USB with this?

\$\endgroup\$
  • \$\begingroup\$ Your first step should be to read the datasheet to find out what its capabilities are. On what basis did you decide to use it? \$\endgroup\$ – Finbarr Nov 11 '17 at 8:15
  • \$\begingroup\$ @Finbarr I needed a cortex M3 core. Because I have plans to do some sensor fusion and control application on it. Also, I've read the datasheet in parts and have done the oscillator calculations based on the STM32 Application Notes. \$\endgroup\$ – Utkarsh Bajpai Nov 11 '17 at 8:26
  • \$\begingroup\$ Then why don't you think the oscillator will work? \$\endgroup\$ – Finbarr Nov 11 '17 at 9:09
  • \$\begingroup\$ I don't know! It's my first time designing hardware. Which is why I came here so that experienced people might be able to find errors that I couldn't. If you see something wrong or if you know of a simulation tool I can use to verify it, so that i won't have to ask questions here only to get downvoted, kindly inform me. \$\endgroup\$ – Utkarsh Bajpai Nov 11 '17 at 9:28
  • \$\begingroup\$ Downvotes often come from asking basic questions that you could easily answer for yourself with very little effort. Like reading the datasheet to find that the device you selected already has all the interfaces you're asking how to add on. \$\endgroup\$ – Finbarr Nov 11 '17 at 10:44
3
\$\begingroup\$

Please find errors and give tips to me.

As you are a beginner this is a very board topic, but briefly:

  • As others have said, there are cheap STM32F1 boards available which you can learn from, before you try to design your own. Look at one of those (or at least its schematic) and compare it to your proposed schematic. You will find many differences. Research those differences to learn more. There is also the STM32VLDISCOVERY development board (based on STM32F1) which has a built-in programmer/debugger (and also other "discovery" boards by ST).

  • There is plenty of documentation for your chosen STM32F103C8 MCU - click on the "Resources" tab on the STM32F103C8 page. One important document is "AN2586: Getting started with STM32F10xxx hardware development". That explains the main hardware design requirements (power, decoupling capacitors, oscillator, configuration pins etc.) and you must read & understand this.

  • Your schematic does not show what voltage you will be supplying to VDDA on pin 9, but some problems include:

    • Check that the voltage supplied to VDDA is within the allowed range.

    • Schematic shows +5V being supplied to VBAT (pin 1). That will kill your MCU. Read the datasheet and AN2586 regarding the allowed power supply voltage range.

    • Schematic shows power only being supplied to VDDA on pin 9. However you must supply power to all VDD pins (and ground to all VSS pins). Again, read AN2586 for examples of power supply connections.

    • Schematic shows no decoupling or bypass capacitors. This is not in accordance with AN2586 and will likely cause intermittent problems (or worse).

    • Schematic shows the BOOT0 and BOOT1 pins floating. This is a bad idea and will cause problems. Read AN2586 and the device datasheet to better understand the function of those pins, how to connect them and why you might want to change BOOT0 during development.

    • Schematic shows no manual reset button and associated components. Are you really sure that you don't want one?

  • Think about how you are going to (a) program and (b) debug your code on the MCU. Although the STM32F1 does contain a primitive serial bootloader (a little like the Arduino that you are used to) this gives no debugging functionality. Read about SWD (JTAG) functionality and see how that (when used with appropriate PC-based software) offers a range of programming and debugging features.

    That is why you will see SWD (JTAG) ports on many of the existing STM32F1 demo / evaluation / hobby boards. You should consider adding an SWD (JTAG) connector to any development board that you design.

[Related: See this question about making an STM32F4 custom development board. The same principles apply here.]


You don't have to learn everything at once, but until you better understand this MCU (which is more complex than your Arduino), then trying to make your own development board is more likely to end in failure. That is why a more efficient and less frustrating path for you, may be to buy an existing development board, learn about how to program and debug software on it (including choosing which toolchain / IDE you prefer - there are many options) and reverse-engineer the design of that simple STM32F1 board.

When you have done that, you will be in a much better position, with improved knowledge, to then design your own development board and for it to be successful, instead of trying to do so now. Good luck!

\$\endgroup\$
  • \$\begingroup\$ Thank you so much. This was the answer that I was hoping to find here. I shall do as you advised. Will update with progress soon. \$\endgroup\$ – Utkarsh Bajpai Nov 11 '17 at 16:24
1
\$\begingroup\$

USART, how do I go about implementing i2c, SPI and USB with this?

It is too early for you for this task, much too early.

anyway - F1xx is a popular but obsolete micro. It does not make any sense to do the dev board using it.

There is no reason for a dev board project as you have cheap and reliable STM ones (and blue pills for $1.2)

\$\endgroup\$
1
\$\begingroup\$

On the Internet you can find more than one example of a working and open STM32F103 board design, and start from there. Or from a finished Eagle project, and modifying it.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.