We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: Richard Lowe
Last Updated: 2016-02-25
Package Version: 1.0.0.0
Category: Storage
Downloaded: 1874 times
Followed by: 3 users
License: MIT license
This is the first of DMA functions that will be available for the ST line of ARM microcontrollers. The idea was born from a forum post. The idea worked so well I made it into a convenient MikroC library.
So far.... memory to memory transfers is what is functional
Do you want to subscribe in order to receive notifications regarding "STM DMA Library" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "STM DMA Library" changes.
Do you want to report abuse regarding "STM DMA Library".
DOWNLOAD LINK | RELATED COMPILER | CONTAINS |
---|---|---|
1375132930_stm_dma_library_mikroc_arm.mpkg [90.53KB] | mikroC PRO for ARM |
|
This library has proven to be useful to me so I thought I’d share it.
Born from a forum post: Memory to memory transfer I made it into a flexible library that I include in my projects.
At the moment it only includes memory to memory functionality but I am working on others.
Example:
Step 1.
You must initialize your library by first providing a channel and priority level
//Initialize memory to memory copy functions based on channel and priority
dma_mem_init( CHANNEL_1, DMA_HGH_PRIORITY );
Step 2.
Start the copy process by providing destination, source, and number of bytes to transfer (currently limited to 65k
dma_mem_cpy( dest, source, 2048 );
Step 3. (optional)
You can also check to see if your transfer is complete or if the controller is ready for another round with this:
Is_dma_mem_finished();
Requirements:
You will need to provide the ISR for the selected DMA stream and within it call:
dma_mem_complete();
For example: If you chose to use CHANNEL_1 on you initialization, you would need to provide the ISR for Stream1:
void transerDone_ISR() iv IVT_INT_DMA2_Stream1 ics ICS_AUTO {
dma_mem_complete();
}
In addition to that, you will need the Boolean library addition which can be found on libstock here: Boolean