#12 ARM Microcontroller Tutorial - USART Receiving
Вставка
- Опубліковано 9 тра 2022
- Purchase my new book: Arm Microcontroller Programming and Circuit Building Volume 1
amzn.to/3LFRaU5
My patreon:
/ newbiehack
How to set the clock speed to 48MHZ:
• #8 ARM Microcontroller...
Introduction to USART:
• #4 ARM Microcontroller...
In this video, I show how to receive a character.
All of the links below help support me at no extra cost to you.
Here are some logic analyzers that I recommend that are affordable:
16 channel Logic Analyzer: amzn.to/3EjzbzC
8 channel Logic Analyzer: amzn.to/3rrnKAv
DreamSourceLab Logic Analyzer: amzn.to/37WR4rG
The Saleae logic analyzer is similar to the one I am using in the video.
Saleae 16 channel logic analyzer: amzn.to/3KRotTi
ARM Kits: newbiehack.com/Categories/ARM
Links to the software:
STM32CubeIDE: www.st.com/en/development-too...
STM Studio: www.st.com/en/development-too...
STM32CubeMonitor: www.st.com/en/development-too...
Parts you will need in your prototyping environment:
Kits to get you up to speed quickly:
newbiehack.com/Categories/ARM
If you already have the microcontroller, here are some breakout boards to use:
64 pin - amzn.to/3rUXeiq
48 pin and others - amzn.to/3IVkC6D
STM-Link V2 Programmer:
newbiehack.com/categories/new...
amzn.to/3IIZlgj
Prototyping Breadboards:
newbiehack.com/categories/new...
amzn.to/3o2Nh1g
Resistor Assortment Kit:
amzn.to/3H4R3ii
Solid core hook-up wire 22 AWG:
amzn.to/3IDGinA
amzn.to/3g5TKUJ
LEDs and Displays:
newbiehack.com/Categories/LCD...
amzn.to/3Az1zf7
Trimmer potentiometers:
newbiehack.com/Categories/Pot...
amzn.to/3H6q067
The Dynamixel servo I will be using in the USART videos:
amzn.to/35s3qHl
Microfarad Capacitor Assortment:
amzn.to/32BIX1G
Capacitors on Newbiehack.com:
newbiehack.com/Categories/cap...
Electrolytic Capacitor Assortment:
amzn.to/33TtLxt
The cheap oscilloscope that I use (because it's cheap and will work all of the projects in these tutorials): amzn.to/2rSHnBa
A better oscilloscope and the one I would recommend: amzn.to/2qizK5M
The brand of the multimeter that I use and the one I recommend: amzn.to/2qicUez - Фільми й анімація
Hey all, sorry for the wait. I needed to go out of town to fix a machine that was damaged on delivery. Please consider buying the book (link in the description), and getting the microcontrollers from me to support these efforts. I also have a Patreon, link in the description. I have been doing Uber driving to make some extra money so I can keep doing this. Thank you all for watching and I hope you continue. It is truly a pleasure to create these videos for you.
Please consider making comments. I think the UA-cam gods like that. Tell me what you think of using the same chip as the receiver to test the functionality of the transmit code.
Good stuff, thank you.
Excellent tutorials!!
Thanks for sharing.
My pleasure!
Well come back, Great 👍 thanks, keep it 💯 updated 💯
Thanks!!
Enjoyed the series so far - brilliant content :)
Thank you so much!!
Hi, so I've got a question. I have a different microcontroller (stm32f401re). This µC only has a USART1_DataRegister to read or write from. Depending on whether you read or write to it, the µC puts the information into a TDR or RDR. But you can't access them specifically by name. So far, so good.
My problem is with the while-loop that waits for the RXNE to tell you that it received data. I stepped through the program and found out that the TC-Bit (transmit_complete) is high at some point, prompting the RXNE-Bit to be high as well. This so far all makes sense.
Now, before I am able to enter the while loop to wait for a receive, the RXNE-Bit goes LOW again and I am stuck in the loop. This doesn't make a lot of sense to me. Shouldn't the Bit be 1 as long as I received but didn't read from it? And only be 0 again once I read the data. I doesn't seem to work that way for me.
Maybe someone here knows the answer :)
BTW: I am really glad I found this tutorial series. It is really really good. Very well explained. In fact, your easy to understand explanations convinced me to buy your book. Didn't arrive yet, though. But I think the other half of episode #4 is missing. You started explaining how USART works and you wanted to use it to control a servo but I couldn't find the video where you actually did it :D
Hi Sebastian. Thanks! Are you storing the contents into a variable?
@@PatrickHoodDaniel Yes, I am storing it in myData = USART1->DR
Die variable is volatile but I can't read it because I never get there.
@@PatrickHoodDaniel Well it appears to be working now. I don't know what changed. I went away from the computer and came back. Somebody else must have been here and fixed the problem ;) Or I just blinded by looking at this the whole day.
Can you use Serial Wire Viewer(SWV/SWO) via printf to Debug STM32 in STM32CubeIDE ?
Yes, you can do this. I have seen it in other youtube videos, but I have not done it yet.
First step: order the MCU
Second step: go have kids and wait for them to grow up
Third step: receive the package and resume this tutorial
Not good to have kids with baby formula supply chain issues. I am experiencing these problems as well, but I am getting better at solving them. Sorry for the wait.
@@PatrickHoodDaniel Jokes aside, thanks for the tutorial - I am trying to use STM32G0 with RS485 transceiver.
@@OrbitalCookie awesome. Then this is the tutorial that will help. There are still a few more USART tutorials upcoming that will help in the RS485 realm. Are you more inclined to use register level code, or autogenerated code?
@@PatrickHoodDaniel I am mostly interested in registry-level, since I have written the simple wrappers myself in rust programming language. But I do sometimes use cube's auto-generation to check how they do it in C.
Hi, this is Rock Rooster Footwear. We sent you an email just now. Looking forward to your reply. Thank you!