Тёмный

Blinky and Running LEDs 🟣 STM32 Programming with STM32F103C8T6 Blue Pill C++ in STM32 Cube IDE 

Binder Tronics
Подписаться 5 тыс.
Просмотров 8 тыс.
50% 1

In this STM32 microcontroller programming with C++, we will be using the GPIO to blink some LEDS and creare a Running LED sequence. Using the Silicon Technologies ARM based STM32F103C8T6 on a Blue Pill development kit with C++ and STM32 Cube IDE.
Git Repository
github.com/Dev...
➥➥➥ SUBSCRIBE FOR MORE VIDEOS ➥➥➥
ru-vid.com...
Facebook ▶ / bindertronics
Twitter ▶ / bindertronics
☕Coffee Funds☕
Shekels
www.paypal.me/...
Patreon
/ bindertronics
Bitcoin
19nohZzWXxVuZ9tZvw8Pvhajt5khG5mspW
Ethereum
0x5fe29789CDaE8c73C9791bEe36c7ad5db8511D39
#STM32 #ARM #STM32CUBEIDE

Опубликовано:

 

11 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 28   
@theintjengineer
@theintjengineer Год назад
Great video! Please keep posting on using C++ to program the STM32 Boards. Thanks!
@BinderTronics
@BinderTronics Год назад
That's the plan!
@TomTom-ty5ej
@TomTom-ty5ej Год назад
Thank you for this useful video! This STM32 seems so weird for me after PIC, maybe it's only the IDE I don't know.... but I definitely will learn it!
@BinderTronics
@BinderTronics Год назад
The base skillset stays mostly the same. Working with one ARM based MCU opens up many paths. Like with anything. The more you do it the easier it gets. You are likely to work with a eclipse based IDE or vsCode with most MCUs available. Its is only Microchip that feel like they need to be unicorns. PIC is not popular in the industry. The only reason it is still relevant is that universities insist on using them in there courses. I have not met a working engineer that would favor using a PIC. At least this is the consensus in my location.
@TomTom-ty5ej
@TomTom-ty5ej Год назад
@@BinderTronics Yes, I think this is the same in my location too.
@nicolasssssssss
@nicolasssssssss Год назад
After using Assembler Language, c without libraries and c with cmsis at University, watching this vid you're using classes with cpp in a uC looks so weird to me at first glance. I have to put hands on it to make it familiar. Great vid, great work! Thanks
@BinderTronics
@BinderTronics Год назад
Don't worry C++ looks foreign every one. Even the guys that claim to be experts.
@CharlesHe-b2x
@CharlesHe-b2x 3 месяца назад
good job u earned yourself a sub
@DeepakKumar-oy7io
@DeepakKumar-oy7io Год назад
Thank you for the video. What is the need for file gpio.c if you are building using main.cpp. Please clarify.
@BinderTronics
@BinderTronics Год назад
4:12 contains the declaration for MX_GPIO_Init
@undercrackers56
@undercrackers56 4 месяца назад
Thank you for sharing. What are you using to program the STM32 BluePill? I have tried ST-Link V2, ST-Link-V3 and USB ST-Link clones but nothing works. Depending upon the programmer I get error reports telling me the device (STM32) is not responding. This is a common complaint with the later issues of STM32CubeIDE. Can you please help?
@BinderTronics
@BinderTronics 4 месяца назад
Get an original st-link-V3 mini ~$10. I used a Segger J-link EDU, it is no longer manufactured. ST does not like people using closes with their software. If you setup a you own tool set the clones work fine. If you want to use ST tools you are going to have to use a Segger or an ordinal ST-Link. If you got a Nucleo you can hijack the ST-link from it.
@jonathan8090
@jonathan8090 8 месяцев назад
Hello again Binder. I am following your videos and trying to replicate to learn. I have been stuck a few days without being able to power on my Led0 (13GPIO). I did everything exactly but nothing. After doing other tests, I found that putting MX_GPIO_Init(); in the main.cpp would make it work. Toggle is working fine. Do you have any clue about what I could be doing wrong? I would like to learn from this and I have exhausted my resources before asking. At least now is working!! Let me know when you can share me any tip. Thanks
@BinderTronics
@BinderTronics 8 месяцев назад
GPIOBase constructor is not running, Try running the debugger and step the code. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-vlJ_80EbMS8.html around the 8 min mark I use the debugger.
@jonathan8090
@jonathan8090 8 месяцев назад
@@BinderTronics Thanks for your reply and time. I will take my time to review it and try to debug it to find out what's happening.
@jonathan8090
@jonathan8090 8 месяцев назад
@@BinderTronics hey there! I managed to fix it. I was missing a line GPIObase::init(); in gpio_hal.cpp. I could focus on that file since the init was there so I double checked again. Now my questions are, What was the purpose of doing these files and settings with public and private. its to being able to init the Douts, keep them away from the main file and being able to call them with a short name? I am trying to understand the logic behind. Thanks!
@BinderTronics
@BinderTronics 8 месяцев назад
For files. It simply comes down to organizing code and reuse. Imagen having a book without chapters or a index. This is what will happen if you use a single files. Real projects can easily be 10k-3M lines depending on complexity. So we break the project down into files that govern a particular purpose. gpio_hal.h only governs the outputs and inputs. The name used or length has no relevants. Just name it something logical. For class access modifiers: public: anything can access it. private: only that class can access it. protected: only that class and its derived classes can access it. It is object orientated programming (OOP) theory. Covered in most courses for languages that have OOP components.
@jonathan8090
@jonathan8090 8 месяцев назад
@@BinderTronics Thanks for the explanation. Pretty much clear to me now.
@tirthpatel7989
@tirthpatel7989 Год назад
Hello is there any way u can make a video or program how to control led using slider on Pic microcontroller?
@BinderTronics
@BinderTronics Год назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-yFvJXxaY4O0.html if it is a analog slider then it is identical to the link
@jonathan8090
@jonathan8090 8 месяцев назад
I really appreciate your work. I would like to study further C++. There are a lot of books right there, Could you recommend me one that you think that would be a good investment of time to learn from? (aside from this content that is really helpful). Thanks again!
@BinderTronics
@BinderTronics 8 месяцев назад
I would recommend C over C++ as a first language. I did not learn from books. What I recommend in general for whatever language is to lookup a course on RU-vid to get the fundamentals. Once you got fundamentals start your own project to solve a problem you have or something you find interesting. The is the only way you will truly learn is by doing, not by parroting tutorials. freeCodecamp.org has a metric ton of courses. w3schools is good if you want a text base course. The Cherno is pretty good for C++ as a supplement (I like the code review stuff). Fair warning, C++ can become awful real fast. GPT chat is also a fantastic learning tool to figure out how something works. It produces awful code most of the time and can't debug but it is still great if you know nothing about a topic.
@jonathan8090
@jonathan8090 8 месяцев назад
@@BinderTronics Oh that's great. Even though I'm no expert in C. I played something with PiC16 using C for embeddeds but I found out that as things get complex is a little hard to deal with, also the capabilities of the pic itself. But thank you for the tips. Even saying that helps by doing it's useful. Today I discovered that one class that I'm taking will focus in C++ for the rest of the semester and I have to code a big project. this will help me with this too . we are using Arduino Uno there. so I will play with both. Thanks mate
@BinderTronics
@BinderTronics 8 месяцев назад
Have a look at the ATmega328P series. It is the same chip as the Arduino Uno.
@WannaTafalHusna
@WannaTafalHusna Год назад
could you describe how the pin interface on the hardware?
@BinderTronics
@BinderTronics Год назад
The reference manual covers it. This series is based on the HAL that ST provides thus the registers are handled by the abstraction, no need bust your head on how the IO works. If you want to know how IO works down to the CPU level. I would recommend having a look at the guys that are building their own CPUs. James Sharman has recently added IO to his custom CPU.
@terrya450
@terrya450 Год назад
Stm32 boards are the most expensive way to blink leds 😅
@BinderTronics
@BinderTronics Год назад
Don't know about your location but the stm32 blue and black pill boards are price comparable to a UNO R3. The STM32 boards can also do more.
Далее
STM32 Blue Pill vs Black Pill Microcontroller Boards
18:31
Women's Defending + Men's 😮‍💨❌
00:20
Просмотров 2 млн
STM32F103C with ST-Link and STM32duino, simplified!
11:56
Blue-pill STM32 Programming Using ST-LINK V2 Dongle
7:53
Women's Defending + Men's 😮‍💨❌
00:20
Просмотров 2 млн