For better learning STM32 programming and debugging
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-07 9:47 AM - last edited on ‎2024-09-12 3:34 AM by Andrew Neil
Hi there,
I have been using STM32 nearly 10 years.
I did modification according to company requirements. But it doesn't mean I am very good at C,C++ or else. I understand coding if it'd in C or C++ format.
I understand mathematics, logics and conditioning.
Kindly suggest materials/ guidelines/ books/ tutorials that might help me to write coding/ debugging and finding root cause of failure.
Let's say staring with ARM cortex type M0.
Solved! Go to Solution.
- Labels:
-
Documentation
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-12 3:31 AM - edited ‎2025-03-26 11:21 AM
@Md Mubdiul Hasan wrote:Kindly suggest materials/ guidelines/ books/ tutorials that might help me to write coding/ debugging and finding root cause of failure.
98% of this is not specific to the particular microcontroller - these are general, transferrable skills.
Most of it is down to being able to analyse a problem and define a solution.
But here are some links to ST's own learning & reference materials
ST's YouTube channel: https://www.youtube.com/results?search_query=stmicroelectronics
@Md Mubdiul Hasan wrote:Kindly send link only for STM32.
You can't be so narrow. You need the general topics like the Cortex-M0 architecture, general electronics, and general C programming.
For understanding the Cortex-M architectures, Joseph Yiu's Definitive Guide books are required reading:
https://www.amazon.co.uk/Books-Joseph-Yiu/s?rh=n%3A266239%2Cp_27%3AJoseph+Yiu
For understanding the STM32, the device Datasheet and Reference Manual are key documents - you will find these and much more on the Product Page for the chip in question.
Some general tips on How To Debug:
Specifically on debugging Cortex-M Hard Faults:
Some learning & reference materials for C programming:
https://blog.antronics.co.uk/2011/08/08/so-youre-thinking-of-starting-with-c/
Some more learning & reference materials applicable to embedded microcontrollers:
https://www.avrfreaks.net/s/topic/a5C3l000000UYGFEA4/t145493?comment=P-1392529
Another important skill is How To Read Compiler Error Messages:
#GettingStarted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-07 10:08 AM
Hello @Md Mubdiul Hasan
For the cortex-M0, i may suggest you the documents available on this link. Also, you can check our progarmming manuals for devices using cortex-M0 et Cotex-M0+ . Also, i may suggest you to contact ARM throw there community or to try there online trainings.
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-07 10:35 AM
Thank you.
Kindly send link only for STM32.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-07 11:31 AM
Hello @Md Mubdiul Hasan ,
You can refer to the STM32 Academy: https://academy.st.com/s/catalog-detail-standard?ltui__urlRecordId=a603W000000XZAHQA4
Or to our articles in this link: https://community.st.com/t5/stm32-mcus/tkb-p/stm32-mcus-knowledge-base
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-12 2:57 AM
Can you suggest very good books?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-12 3:06 AM - edited ‎2024-09-12 3:11 AM
Google it:
https://www.st.com/content/st_com/en/support/learning/stm32-education/text-books.html
https://leanpub.com/mastering-stm32
https://www.elektormagazine.com/news/advanced-programming-stm32-mcus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-12 3:31 AM - edited ‎2025-03-26 11:21 AM
@Md Mubdiul Hasan wrote:Kindly suggest materials/ guidelines/ books/ tutorials that might help me to write coding/ debugging and finding root cause of failure.
98% of this is not specific to the particular microcontroller - these are general, transferrable skills.
Most of it is down to being able to analyse a problem and define a solution.
But here are some links to ST's own learning & reference materials
ST's YouTube channel: https://www.youtube.com/results?search_query=stmicroelectronics
@Md Mubdiul Hasan wrote:Kindly send link only for STM32.
You can't be so narrow. You need the general topics like the Cortex-M0 architecture, general electronics, and general C programming.
For understanding the Cortex-M architectures, Joseph Yiu's Definitive Guide books are required reading:
https://www.amazon.co.uk/Books-Joseph-Yiu/s?rh=n%3A266239%2Cp_27%3AJoseph+Yiu
For understanding the STM32, the device Datasheet and Reference Manual are key documents - you will find these and much more on the Product Page for the chip in question.
Some general tips on How To Debug:
Specifically on debugging Cortex-M Hard Faults:
Some learning & reference materials for C programming:
https://blog.antronics.co.uk/2011/08/08/so-youre-thinking-of-starting-with-c/
Some more learning & reference materials applicable to embedded microcontrollers:
https://www.avrfreaks.net/s/topic/a5C3l000000UYGFEA4/t145493?comment=P-1392529
Another important skill is How To Read Compiler Error Messages:
#GettingStarted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-12 4:07 AM
Reading helps, but I recommend doing that in parallel with working / playing with some real programming environment and hardware.
So get a Nucleo board, install STM32CubeIDE - and just do it!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-12 4:31 AM - edited ‎2024-10-07 4:57 AM
@LCE wrote:So get a Nucleo board, install STM32CubeIDE - and just do it!
:thumbs_up:Indeed! :ok_hand:
Don't waste time with a blue/black/whatever pill - get a genuine ST Nucleo, which includes a genuine ST-Link, has a load of ready-to-use examples, and is well-known and well-supported by both ST and this community.
Getting Started steps:
- Write some code to blink an LED connected to a pin, using a simple software loop.
- Learn how to use your debugger to step through your simple LED code, look at your variables, set breakpoints, etc
- Learn to use the UART to transmit a fixed "Hello, World " string.
Again, practice using the debugger with it. - Adapt your code to be able to send a variable string.
This will be invaluable for future work!
Keep practicing with that debugger... - Adapt your code to be able to receive on the UART
- By now, you should be well prepared not only to write your own code, but also to debug it.
(From an original post here, but the formatting there seems to have got corrupted)
PS:
Applying the above to a specific project:
#BeginnerGettingStarted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-12 5:22 AM
Andrew,
Your suggestions looks suitable.
I have few different STM32 board to play with.
Let's try your materials.
