A little background
I am another graduate of a Moscow university (I will not specify which one, but mediocre). Six months ago, we were told that it was time to write a diploma. At that time, I just started to master microcontrollers and it wasn’t that hard for me, but with the creaks that the refrigerator produces when you, alone, try to gently move it without damaging the precious laminate (in my case linoleum).
My training began when I became interested in the topic of microcontrollers two years ago and an engineer who asked about them gave me a 300x200mm fee and said that it has a STM32F217ZGT6 controller and this board has everything you need for training. “In general, you will master it - everything else will seem like garbage” (he didn’t say that to blink the LED, you need to set up SPI, which I didn’t even hear about at that time). After three not very tense months of futile attempts, awareness of the weakness of programming skills and the huge amount of articles read, it was necessary to fork out for STM32VLDISCOVERY and the way to copy programs and experiment with them finally went, but still slowly.
For a year and a half, I managed to work as a developer, looked for vacancies where I work with STM32 (because I think that now they are the most promising microcontrollers of their class), picked up experience and when it came to the diploma, he remembered his painful calluses. The idea with the theme came instantly:
"The debug board on the STM32 and (full) training course (for the smallest) to it."
')
Yes, I know, I know, from many engineers I heard that with the theme “debugging board”, “if I were a teacher, I would have filled you up with protection,” but I still think that any idea has a right to life, so everyone who is interested, Please read further.
I am aware that there are many articles where it is written what, where and how. And how to work with registers, how to understand what they do, etc. etc. For me (maybe from a great mind) many such articles were still not clear and I could not get out beyond the blinking limits of the LED without examples of working code for quite some time. Plus, even in cycles (6-7 pieces each), the system was not always traced, many things were not chewed (which I missed very much), and most importantly - they ended without closing the topic until the end, leaving even more questions behind.
That is why I wanted to write a complete and complete course, so that others did not suffer and figure it out for themselves. So, having come to the institute and realizing that for quick mastering and understanding, an incentive is needed (or rather, such a good stitch), I began to beat myself with my heel in the chest (to dig my own grave), that I would not only write a training course (I had to call his methodological manual), but I will also provide a working model. They accepted the topic, wrote the assignment (dug a grave, ordered a gravestone), it was up to you to write everything down and work out (lay down in the grave, dig in and put a gravestone).
Life has shown that I didn’t have time for half a year, but all the same, the time allotted for the diploma was almost over, protection was very soon, but it’s not surprising that everything is not only ready, but almost 100% tested (on living people in including).
The output is the following:
1. The course itself (methodical manual in a scientific way)
Briefly about him we can say that in my opinion and according to testers testers, it is full-fledged, but a bit harsh and not finished. Since I decided that I would not write a textbook on programming on SI, therefore, there are no explanations of operators in the course, and therefore they said that the course is severe in places. Regarding the shortcomings, I will honestly say that I did not have time to debug everything for delivery, in order to write about it not only here, but also in the methodological manual for delivery. I also think that it is possible better, but more on that later.
2. Debug board on STM32F103RET6 controller
Everything here is slightly better than in the first paragraph, the board was developed, ordered (because of the circumstances it was necessary to order urgently) in Rezonite, components were ordered, soldered with handles (to be honest, no video will convey the sensation of the first LQFP64 soldering) and tested (most of it earned immediately). But this is a layout and, of course, was not without overlays: wiring, adapters and other various “crutches”, but unfortunately I don’t have time to order a second revision, and I probably wouldn’t have done it to protect my diploma. So below I will tell you more about this debug board.
Having come to the first job as an electronics developer, I came across one interesting opinion and, as it turned out, it is very common. This opinion sounded like this: “I’m a programmer and I program microcontrollers, I don’t know circuit engineering and I don’t want to know, by the way, I don’t know how to solder either.” After talking with a group of programmers outside the company, I realized that the person from my work is far from alone in his opinion, and although I don’t support him, it’s worth understanding and respecting the opinions of others, all the more it fits perfectly into the concept of the all on board debug board. . In this regard, the board turned out to be quite “fat”, called STM32SB (SB-StudyBoard) V1.0b. Below we analyze what it has entered.
1. Microcontroller
Based on the fact that I worked with the STM32F103RET6 microcontroller, it was chosen for the project.
2. Power scheme and hardware USB controller
This microcontroller has a built-in USB, which it was decided to bring to a separate connector.
3. Speaker
It was decided to introduce for the development of PWM modulation and learning to write melodies.
4. Digital indicator and shift resistor
For the simultaneous mastering of the dynamic display and the shift register, it was decided to combine them.
5. LEDs
LEDs, what could be better? Only three-color LEDs, where you can master the smooth change of colors.
6. LCD display
Standard LCD display with 2 lines of 16 characters for mastering the parallel interface.
7. Keyboard
Matrix keyboard, you need to know and be able to.
8. I / O port extender
There are no many I / O ports, and I2C can also be mastered.
9. Electronic thermometer
A 1-Wire temperature sensor, a useful thing and valuable experience with it can be useful.
10. Electronic potentiometer
On this thing you can master the full SPI and try to make measurements of voltage changes through the ADC.
11. Relay
Although it is at the level to blink an LED, but it's still nice to hear a familiar click, right?
12. Key transistors
Also at the level of blinking LED, but suddenly to whom the principle is not clear.
13. Duplication of free pins on external outputs
Well, this is a natural design for any debug board, all of a sudden everything that was in it was not useful to anyone, but you still need to connect something.
14. Converter WIFI-UART (esp8266)
In the circuit, the converter participates as a connector; it is also indicated here. Already quite sensational esp8266 module is used.
15. USB-UART converter
USB is always cool, here we use CP2102 chip.
16. JTAG and SWD
Well, where do without these things.
Such a wide range of external devices will make it possible to master most of the techniques and try to work with most of the interfaces, without bothering to purchase items and without departing from the table, which is consistent with the concept of not only “everything on board”, but also “for the smallest” (who cannot solder ).
Of course, it didn’t go without overlays, but, as one familiar engineer says, “the engineer’s skill is measured in the number of tracks cut on the first iteration of the board”.
Here is a list of my "jambs", something that I did not notice, forgot, or did not even know when designing this board:
1. I understood that the SWD pins are arranged in a strange order and at least this does not interfere with the work of the board. I heard, in my opinion, the correct opinion that they should be placed as they are located on STM32VLDISCOVERY, in order to avoid misunderstandings with the new user.
2. So you shouldn’t connect monochrome LEDs, as on this board, because JTAG needs to be remade for blinking, but the effect of indicating the firmware download process is unexpected for me.
3. I designed my logo for this board, which I wanted to transfer to the PCB and place on the board, but I forgot.
4. To save space in the second revision of the board, I would place some unused SMD components on the bottom side of the board.
5. I understood that for more convenient wiring of circuits with quartz resonators, it would be convenient to replace them with SMD.
6. I forgot to sign where JTAG and SWD are, they also don’t show how to connect them and if everything is not so difficult for JTAG and its BH-20 connector, then the situation with SWD is somewhat more dangerous.
7. When designing a footprint of an LCD, an incident came out and the holes were too small for M3 bolts.
8. At converter CP2102, pins RX and TX are confused. Since I’m used to the fact that the documentation provides an example of the connection with respect to the microcontroller, and not the external device, I had to cut 2 tracks.
9. On this board, the distance between the pins is not normalized by inches, and therefore there is a problem for connecting to a bezel-free development board by sticking it into it.
10. An overlay came out with current limiting resistors in the indication circuit of the relay, the rating was too large for the relay to switch.
11. Well and, as usual, “good thinking comes afterwards.” So, after receiving the payment, I realized that it was worth making the size of it suitable even for some kind of body - I would probably have to finalize it in the second revision.
12. Initially, a small digital indicator was laid, since it did not occupy a large area and was available in stores, but it turned out that in fact it was everywhere available when ordering from 520 pieces, so I had to sculpt the adapter to a standard digital indicator.
Finally, I’ll show you a 3D model of this board:
And to compare the pictures of her, as she turned out "live", view from the top:
And the view from the side, so that you can see more "crutches":
Sorry, but I would not like to lay out the whole project before passing the diploma, but after this work I had a question, is it worth developing this project? I was visited by the idea to write a series of articles devoted to learning, where such a complete course on this debug board would be presented, where everything is written in simple words and explained on fingers. I would like to hear from you in the comments how useful and necessary this is for the present.
Thanks for attention!