First of all, welcome to the community. I skimmed through your code and gotta say its was pretty clean. All are correct, except the lines: //channel 4 selected
DMA1_Stream6->CR |= (0x1<<25);
DMA1_Stream6->CR |= (0x1<<26);
DMA1_Stream6->CR |= (0x1<...