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 .
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’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?