Hello Everyone, I have been learning to work with my STM32F429I DISCOVERY board. I learned to work with SPI ,I2C and USART communication peripherals using the HAL API . I now want to learn the driver development for the same communication peripherals.
Would Like to know how should I go about it. I have found 1-2 good videos on YouTube related to it.
Let me know if anyone knows more good resources for getting started with driver development .
Philâs Lab YouTube channel has at least one video dedicated to writing STM32 drivers, if I remember correctly. Many of his other videos also touch on the code, but perhaps more above the driver level.
Yes, I checked it out, I was looking for a more structured course on Bare Metal Programming and bought one course in UDEMY by Israel Gbati. Loving it so far !
More specifically, if you really donât want to use HAL (which I totally understand), then you should take a look at the Reference Manual for that particular chip. Specifically, youâll find the rubber meets the road in the register description section of whatever peripheralâs section youâre reading in the RM.
If youâre not a religious man (or, even if you areâŚ), this is your bible now.
I have found âEmbedded Systems with Arm Cortex Mâ to be a really good resource. Coupled with the reference manual and datasheet or your flavor processor, youâd be well on your way.
Iâve been writing my own drivers ever since university, thatâs how they taught us. I wasnât aware of HAL until recently, and to be honest, it seems like more work for me now to learn how to use HAL than just opening the ref manual.
However, my memory is crap, and I often forget how/why/what registers I needed to use, and when I come back to an old project, I just simply canât remember. Most recently, Iâve been writing some drivers for the UART, PWM, PLL, and a numerically controlled oscillator, which is a neat trick I recently stumbled upon for generating sine/cosine waves by multiplication of phasors. I decided this time to write some notes as I go, theyâre mainly innate ramblings of what I did (rather than a tutorial). But, in case theyâre even slightly helpful (Iâve hit my head against the keyboard a lot whilst writing STM32 drivers without libs, because the RM can tend to leave out important details, or theyâre so buried itâs hard to find):
In any case, I hope it helps. The readme explains the most recent additions to my drivers, I havenât added the NCO or a few other things yet, but it might help in a pinch!
Hey, Thanks for sharing your GitHub repo Max! Just checked out the code for uart driver, explanations in the comment is very detailed, I am using an discovery board and having issues in verifying which USART is connected to the COM port, can you help? whatâs your email id?