Using DMA to send data through UART

Thread Starter

Xenon02

Joined Feb 24, 2021
480
Reading about something can only get you so far if you don't have the foundational theory of why it's needed already in your head. The DMA controller in a typical 32-bit controller is a complex beast that requires an understanding of computer hardware architecture to see things at the logic level. It works, it's cool and eventually you will understand if you build things in software on hardware at the embedded hardware level.
I just have this bad habbit of asking "why" everytime I see something, which leads to asking a very specific questions, and they can even confuse me more than it should :D But I have a feeling to want to understand it or I won't sleep at night because it's to late or I have stucked in this topic for to long that it has 10 pages and my mind finds some logic errors ;D

That's why I've started reading how memory is made, and how Read and write works in the same 8 bit data line that is connected in one place, usually there is nothing I can find so I usually sit and draw something until it somehow makes sense using the basics like how memory cell looks like (I thought of multiplexer but it's not two directional that input changes into output, so I thought maybe 2 transistors, which one is negated and the other one is normal, the bit pick the transitor, both transistor one leg is connected to the same bus wire). Or other dillema with all memory in HZ and the input devices must be connected as I read somewhere so yea maybe pull up resistors etc.

I always wondered how people know it and so I had to pick up with understanding in gate logic level, I will try to pursue this idea and learn programming STM32, but sometimes this gate logic level understanding is to complex to understand at some point. Because at first I was like, cool DMA works without CPU then I was like how it does it in logic level etc. But it is very complex beast as you said. So I wondered how to approach these type of dilemmas to not bother here a lot. In VHDL I don't exactly connect individual logic gates, learning from this might not be effective is what I thought ;>And I also thought which questions are good to ask and which not.
 

Thread Starter

Xenon02

Joined Feb 24, 2021
480
it works, it's cool and eventually you will understand if you build things in software on hardware at the embedded hardware level
Sorry for spam.

Or any guidance where I can start ? :D
Because as I said when I learn from tutorials they use registers or know how it is build in logical gate way, I usually get stuck with code or try to make stuff in my head like imagining how it could work, but I can't sometimes find in websites the answer to my questions like how UART works in logic gate view or DMA or how the bus works and how it can read or write in memory from the same 8 wires or more.
So I am stuck I hit the wall. And eventually understanding how it works at embedded hardware level (I think it is the same maybe as logic gate level ? ) from where :D ? From basics I learned only how Adder/Half Adder and some multiplexer works building simple ALU and how register works and that's all I had in school and from this point it stopped :) So I wondered where to start now :D When I see these UART and other stuff I get to puzzled on how it works in not only in software but as hardware or how a specific thing works like identyfing the flags etc.
 

nsaspook

Joined Aug 27, 2009
12,273
You can start with a few classic books like this and start building things: https://ia600607.us.archive.org/3/items/DigitalLogicAndComputerDesignByM.MorrisMano2ndEdition/Digital Logic And Computer Design By M. Morris Mano (2nd Edition).pdf

That's the problem with trying to learn complex subjects looking for information like a jumping-jack, eventually you hit a wall or fall off a cliff.
You need a broad base of sometimes boring information to build on.
There are no shortcuts, those with the knack can't explain it to those that don't have it.

 

Thread Starter

Xenon02

Joined Feb 24, 2021
480
You can start with a few classic books like this and start building things: https://ia600607.us.archive.org/3/items/DigitalLogicAndComputerDesignByM.MorrisMano2ndEdition/Digital Logic And Computer Design By M. Morris Mano (2nd Edition).pdf

That's the problem with trying to learn complex subjects looking for information like a jumping-jack, eventually you hit a wall or fall off a cliff.
You need a broad base of sometimes boring information to build on.
There are no shortcuts, those with the knack can't explain it to those that don't have it.
Oh my :D I've seen this video before ! But I don't remember when and where.

May I ask one more question before I start reading this book you've recommended ?
I've been wondering how UART know that 1st bit is a starting bit and the other bits (that are "0") are not.
So I've seen this circuit :

1700449960948.png

And it was a bit weird because when the bit start ("0") appears in TTL it doesn't restart the Counter and when U3-Q is high then it restarts the counter bit when bit start appears it doesn't restart the counter. More over the bit start restarts the 555 timer and this bit is not shifted in the register, but normal data bit that is also "0" will also restart the 555 and will also not be shifted to the register. What is more over the clock as I know starts working when TTL is "1" so in the whole cycle the 555 doesn't work when TTL is "0", but what if next bit is also "0" then the clock is still waiting ;)

Weird circuit.

Sorry for this random message, I'll read the book you've recommended, just leaving this interesting thing I've found before I checked the book :>

Have a nice day/night !
 
Top