2012-11-13 09:46 AM
Hi. My name is Steve. I have some microcontroller experience with AVR, Stickos and Arduino and have recently bought an STM32F4 discovery kit as I am interested in its DAC , DSP and audio capabiiteies.
I have some experience of C and am always learning but am a total noob to ARM and STM products. I was hpoing someone could point me in the right direction, or give me a little info on what the DMA is/does and how the STM32F4 peripherals use it...I know it stands for direct memory access but this is about all. Could anyone give me an idiots primer into DMA?? Any help seriously apprecxiated. p.s I am using windows XP and have Atollic, Coocox coide and Keil MDK installed. I have got them all working and like coocox & Keil so far.... Cheers! #stm32f4-discovery #dma2012-11-13 10:18 AM
Think of it as a Direct Debit (giro) on your bank account, assorted bills get paid, and your pay check gets deposited, automatically.
ie You set up several transactions, they occur periodically, at a rate determined by the peripheral or a timer, or full-bore, and this occurs independently of the CPU. Some USART DMA examples [DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Discovery/UART with DMA mode&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F¤tviews=593]https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2FSTM32Discovery%2FUART%20with%20DMA%20mode&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F¤tviews=593https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/DMA Memory To UART5&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=650
You can get interrupts when it gets half way through the buffer (HT - Half Transfer), or when it finishes (TC - Transfer Complete). You can have it do the same buffer repetitively (Circular), which can be good for audio, where you have a ping-pong buffer that you fill at the TC/HT intervals.