Very nice tutorial! I was familiar with setting up the external clock, but still you teach me nicer ways of doing it. And I didn't know you could actually check the clock speed. Amazing!
You're the boss , man. Thank you very much for explaining that very important thing about the STM32. I couldn't have realised by myself which specific registers are important for this.
Been stucking with HSI configuration for 80 MHz and you just saved me! The Flash Latency which I really didn't notice before is the key of this video for me. Thanks alot!
Estoy suscrito a tu canal desde hace bastante tiempo. Ahora estoy seguro que es el mejor canal referente a la electrónica, sobretodo a la electrónica digital. Es muy innovador, interesante y sobretodo muy claro y pedagógico. Es increíble lo bien que están hechos tus videos y sobretodo la claridad con la que explicas. Muchas gracias, y espero que sigas con este proyecto que tanto puede ayudar a estudiantes, ingenieros y entusiastas a la electrónica digital. Espero en algún punto puedas hacer algo de VHDL, sería de lo mejor. De antemano, muchas gracias por todo...
Thanks a lot for explaining the NON-HAL CMSIS-only way. There are too few of such tutorials these days, as everyone doesn't care about what is going on "under the hood" anymore. Obviously, every MCU-geek should be able to read the reference manual and find out on their own, but this tutorial is a very welcome shortcut.
Yeah i think its important to understand at least to some degree whats going on under the hood, I have found bugs using HAL that otherwise been hard to track down without going into the registers and seeing what HAL was doing wrong or forgot to do. HAL is human made so there are bound to be bugs.
Might I add, your videos are very in-depth. I don't know how invested you are in this channel, but I think that it may be worth your time to add an index of what you cover and the associated time-stamps. These are the most useful tutorials I've seen and I'd like to see your channel thrive.
@@EdwinFairchild Whats the best way to get in touch with you? I am on misozimwale@gmail.com I like your way of presenting stuff Sir and I would like to interact with you
I really will not make too many f1 videos, but I'll see. F1 is a really really old chip. But maybe I'll do USB , but you realize that will most likely involve an Rtos or some abstraction. Or else you will be seeing with a plethora of interrupts to handle data transactions.
Yes, internal clock does not require a physical external crystal oscillator. It is taken care by the micro controller itself. But it is not very accurate when compared to external oscillator.
Good stuff but I would argue that bit definitions are not worth the trouble. When you look up the bit that needs to change (from ref manual for example), why insert a cryptic label that obscures that value? Now you have to look up that label to make sure it means what you want??? Just use the number.
not sure why you think its cryptic ? I find bit definitions help me and thus i DONT have to look into the ref manual . Can you imagine reading code like this : (RCC->CFGR |= 1
@@EdwinFairchild There are several problems here. There are 10's of thousands of bit definitions. For every one that is obvious to you, there are ten that are not to me. And they make header files 10X larger than they have to be. I'd rather look in the ref manual (that I need to know anyway) than sift through 14,000 line files trying to find what label someone decided on. My projects are 100MB before I even start coding, mostly due to HAL and LL files I don't want.
@@kenwallace6493 I really should make a video on the topic , I guess if you don't know how to look for something it can be daunting but it is so simple infact. And you're preaching to the choir here, I have zero videos on HAL because I don't use it. But bit definitions is a completely different thing. It's just the header file of the chip, don't tell me you sit there and define a pointer to address 0x80020000 and call it GPIOA , then I would believe you are being efficient and just defining the addresses you need, otherwise it's just masochist. I'm not sure if you're just a hobbyist or an engineer but as engineer you need to learn how to use the tools for the job. I am all for using register level code but redefining bits or just hardcoding left shift and right and coming back and reading that months later is not fun. Its funny you say you need to learn how to read the manual because the bit definitions come exactly from the manual so I'm not sure how reading text on the manual and reading the same thing in code can scare you. Like I said if I make a video on something like LL and show you the conventions used it will be an epiphany , reading the manual is great and it's what I teach..but at some point you have to get some shit done, let me know how programming ethernet baremetal stack just by reading the manual goes.
@@EdwinFairchild I'm a power conversion engineer with 50 years experience so have been retreaded several times. Programming is only about 20% of the job and power converters are always one microsecond from disaster so close to the metal it is. I do use and appreciate the pointer constants to the configuration registers but there are only so many thousand-page manuals I have time to learn. For example, picking a HAL or LL functions that "seem to say what I want" just won't cut it. It's probably OK for communications where an error is often benign but not for timers, ADCs, DACs, PWM, and digital control loops. In short, our projects tend to be small, dedicated, time-critical functions focused on one part number. But then I came up from the bottom (Assembly to C) as a side effort so don't have the professional programmer's perspective.
@@EdwinFairchild Please if you can ,create stm32f103c8 I2C tutorial without DMA, ONLY CMSIS. I want to use my MPU 6050 and sometimes my code is freezing. I read whole stm32 datasheet, mpu6050 data sheet, tried everything , researched a lot of codes , but still have same problem. :( I dont know what else can I do.
@@emmetray9703 MPU 6050 is quite bad, especially if you are trying to find orientation along all 3 axis. You should look into ST MEMS sensors, as they are generally higher quality than the Invensense sensors. Kris Winer designed an IMU with the EM7180 sensor fusion co-processor, which manages the sensor fusion saving resources from your main processor. Its explained far better on his website and GitHub Repo: www.tindie.com/products/onehorse/ultimate-sensor-fusion-solution-lsm6dsm-lis2md/ github.com/kriswiner/EM7180_SENtral_sensor_hub/wiki
@@emmetray9703 Read Kris Winer's GitHub Repo articles. Seriously. I glossed over them at first, but if you take the 20 mins. it is definitely worth it. The BNO series are not as good as the ST sensors according to some of Kris' tests.
Why without DMA? Even for low frequency updates it is still nice to let the DMA handle everything and handle the interrupt or read the buffer when you want.
hello, i tried setting my clock to 72 using the tutorial but i am not getting anything even my led toggle has stopped working, and i am getting stuck at HardFault_Handler what could be the problem?
Have you tried looking at my blog and copying the code , I think on my blog I did a different speed , but check your code. Because this is working code
@@EdwinFairchild i did copied from there not sure why its not working i tried using cubemx and it configures perfectly and everything works but cannot make it work this spent almost whole morning
@@surya.6283 Sounds like a good idea. I was thinking along the lines of an industry accepted best practices , because sometimes as hobbyist or just normal users you do things that no company would allow you to do, like using "go-to" statement in C or making everything global variables etc .. even some programming styles are preferred over other ones. I'll see if I can write something up then make a video