 So, in this section, I'm not going to be on PowerPoint, so we're all going to be on the cheat sheet that you saw Anders using earlier on. And we're now going to do the section called GPDMA. So, as you can see, there's quite a lot of elements in this section. I've got about 75 minutes in this time slot to do all this. So hopefully we should finish by about 11.30 where we'll break for lunch because I know there's quite a lot of European colleagues who are a lot further ahead than the UK time is. So I'm aiming to finish around 11.30 UK time for this section. We might over un-dependent on how far down these list of items we get. So we're going to talk about the GPDMA. So hopefully you've all used our standard DMA, so our legacy DMA approach, where we do have a basic DMA example there in the section, but we're not going to cover that in today's workshop. What we're here today to do is build our example, which you can see here below. This is going to be our example that we're going to build up using the CubeMX, the Cube IDE. And we're going to look at the new linked list feature. So that's the key element that we're going to be examining today in this GPDMA hands-on. So there are some extra features in there. I've just noticed a spelling mistake there. So we do have some triggers, not triggers, and there are some events and 2D addressing. So depending on how well we get through these items will depend on if we cover all of them today. But they are here in the example, so you can go through them all with the hands-on. We might get that far. It depends how many issues we encounter as we move through the DMA. That's a very interesting question. So we're going to build up this example using hardware elements and what we call our GPDMAQ, which is basically our linked list. So normal DMAs, you would set up the information inside the DMA, or specifically the specific channel of the DMA. And then that would do a particular task like transfer data from the ADC into RAM location. So that would be normally what you'd set a DMA channel 1 to go and do. And then you'd set DMA channel 2 to use the UART and transmit said data out over UART. And that would be done on different channels. Now with this linked list feature, you can set up a queue of different tasks for each channel that you've got inside your DMA. So our hands-on that we are going to do is going to do your normal DMA process. So it'll set up to read the ADC from whichever channels of the ADC and load into RAM. The ADC is going to be triggered by a timer. So you'll start the timer off as well within your original DMA configuration. When the timer event happens, the ADC will transfer channels 1 through 4 into RAM. And it'll do that 16 times. So you'll end up with 64 different results inside your data array sat in your RAM. Then you reconfigure your DMA channel to do the second item in your linked list or your second node of your linked list. This one's going to do 2D sorting. So I'll explain what the 2D sorting is when we reach the relevant chapter later. And this will take the data and reorganize it in a particular one. So all the channel ones are located in blocks 1 to 16, then blocks 17 to 32 would contain channel 2 and so on. Then you will go and reconfigure your DMA channel again. The same DMA channel from the next node in your linked list, which is the UART configuration. And then that will take the sorted data and transmit that out over your UART. So all this is going to happen using just one of your DMA channels. So whereas previously that would have taken 2 DMA channels and some CPU processing. This can now be all done inside one DMA channel. So your CPU can be sat asleep at that point. So the linked list. So in our particular hands on, we are going to set up our ADC to convert the four channels in circular mode. Generate all the relevant DMA requests as you would normally have done in a standard DMA operation. And we're then going to set the link list for the GPDMA so that it does this function. So we're going to use the link list just to do a single function. So you can do it in a single function as well. And once we've built our link list, it then becomes very easy to add all the other steps for the sorting and for the UART. At a later stage of this hands on. So if you're developing your code, you can start with a simple DMA. If you've configured it to use a link list from the start, then if you decide suddenly I need to add extra things, it's easy. You just add another item to your link list and your coding becomes a lot simpler at that point. So this is the classic DMA. So this is basically what we're going to be doing in the first step. It's going to represent what you would normally do here in the classic DMA. And what you would do, you would have your counters that will count down the number of cycles that you're transiting from your source memory, which is your ADC data register to your destination memory, which is a buffer somewhere in RAM. And it'll count down all the data and eventually you'll get down to zero data. Because it's in circular mode, then it will go and repeat the block again. So because we're using this link list feature that we have inside the GP DMA. We have a section of registers that make up the link list that contain all the different parameters that we need for the DMA configuration. And our link list, because we've only got one area, your link list register, which is the one that's sat right at the bottom, will then just point you back to the start of your original link list. Because we've only got one, we're only going to start with one element or one node inside our link list. So our link list address at the bottom will be back to the start of our register set for the link list, which will then get reloaded back into the DMA channel to do the same section again. So our DMA will do exactly the same. It'll take the source memory and it'll load it into the destination memory. When the counter reaches zero, our link list will go and look in the memory area to see all the different link lists. So if you've got multiple nodes, there'll be more of these arrays in the list. It'll go and find that one. And it'll then load all these parameters into the DMA configuration and start the process again. So it'll transfer the data and count down as it would again and then go back to the next area of the link list to see where it's got to go next. But because we're only having one node inside here, it'll just keep going and loading the same parameters back in and resetting all these registers back to the original configuration. So those registers, so there's plenty of registers in there. You need to figure out what they are. Most of them you don't need to know. So it's the source and destination addresses, the block counter register, the transfer registers and the link list register. So that's the really important one is that link list register. And when we're going through the code, I'll be showing you where that one is located inside the software because that's the one that has to point to the correct location for the next node. So once we get more than one node, that's the register that's going to become quite important for us.