Dec 19, 2014
12:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 19, 2014
12:16 AM
Good day,
It shall be a lamer question. 😮
Meanwile, after DMA data transfer completed,
I have data in defined memory area, say 0x8000000.
How I can get this data afterwords for processing in C?
I suppose I need define (volatile) array, wich must be placed exact in same area of memory.
How it can be done?
Thanks in advance,
Konstantin
It shall be a lamer question. 😮
Meanwile, after DMA data transfer completed,
I have data in defined memory area, say 0x8000000.
How I can get this data afterwords for processing in C?
I suppose I need define (volatile) array, wich must be placed exact in same area of memory.
How it can be done?
Thanks in advance,
Konstantin
- Tags:
- IFX
6 Replies
Attachments are accessible only for community members.
Dec 19, 2014
12:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 19, 2014
12:40 AM
Sorry that I might not understand your question fully.
So after a successful DMA transfer, it will trigger an interrupt which you can read the memory directly as shown below.
uint8_t destination_buffer[100];
void DMA_ISR (void)
{
Block_transfer_Cnt++;
//example
if (destination_buffer[0] == 0)
{
}
if (destination_buffer[1] == 0xAA)
{
}
}
So after a successful DMA transfer, it will trigger an interrupt which you can read the memory directly as shown below.
uint8_t destination_buffer[100];
void DMA_ISR (void)
{
Block_transfer_Cnt++;
//example
if (destination_buffer[0] == 0)
{
}
if (destination_buffer[1] == 0xAA)
{
}
}
Dec 19, 2014
06:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 19, 2014
06:50 AM
Good day Travis,
Thanks.
I know that data can be taken after DMA interrupt directly.
I suppose:
- define array exactly in place where DMA data will be transferred aftewards
- transfer data using DMA in that place
- on DMA interrupt array will be fullfilled already then, so you save time
Is it possible?
BR
K
Thanks.
I know that data can be taken after DMA interrupt directly.
I suppose:
- define array exactly in place where DMA data will be transferred aftewards
- transfer data using DMA in that place
- on DMA interrupt array will be fullfilled already then, so you save time
Is it possible?
BR
K
Dec 21, 2014
06:35 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 21, 2014
06:35 PM
XmCfAn2014 wrote:
Good day Travis,
Thanks.
I know that data can be taken after DMA interrupt directly.
I suppose:
- define array exactly in place where DMA data will be transferred aftewards
- transfer data using DMA in that place
- on DMA interrupt array will be fullfilled already then, so you save time
Is it possible?
BR
K
- define array exactly in place where DMA data will be transferred aftewards
Yes, you can define an array eg. destination[8] and state the destination address. So sorry that I do not understand what you mean. Maybe you can describe more in details.
Dec 22, 2014
01:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 22, 2014
01:39 AM
Good day Travis,
No need to sorry:cool:, thanks for your support,
I really apprechiate it!!!
So, for example:
- I define array destination[8] //It is clear for me
- next, I shall somehow "assign" it to be placed in certain memory area //So, how I can do it?
BR
K
No need to sorry:cool:, thanks for your support,
I really apprechiate it!!!
So, for example:
- I define array destination[8] //It is clear for me
- next, I shall somehow "assign" it to be placed in certain memory area //So, how I can do it?
BR
K
Dec 23, 2014
12:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 23, 2014
12:10 AM
XmCfAn2014 wrote:
Good day Travis,
No need to sorry:cool:, thanks for your support,
I really apprechiate it!!!
So, for example:
- I define array destination[8] //It is clear for me
- next, I shall somehow "assign" it to be placed in certain memory area //So, how I can do it?
BR
K
Hi,
So sorry that I do not have a graceful solution to this programming, maybe you can use pointer to help you. I am also looking on how to mapped array to a specific memory location.
BR
Travis
May 29, 2015
01:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 29, 2015
01:36 AM
Hi Konstantin,
"Meanwile, after DMA data transfer completed,
I have data in defined memory area, say 0x8000000
How I can get this data afterwords for processing in C?
"
To access the DMA transferred data in location starting at 0x80000000, why can't you use the pointer?
For eg:
#define DATA_COUNT 100
uint32_t arr[DATA_COUNT];
for(uint8_t i = 0;i < DATA_COUNT;i++)
{
arr = *(uint32_t*)(0x80000000 + i);
}
DATA_COUNT is the number of DMA data words.
regards,
Nisheedh
"Meanwile, after DMA data transfer completed,
I have data in defined memory area, say 0x8000000
How I can get this data afterwords for processing in C?
"
To access the DMA transferred data in location starting at 0x80000000, why can't you use the pointer?
For eg:
#define DATA_COUNT 100
uint32_t arr[DATA_COUNT];
for(uint8_t i = 0;i < DATA_COUNT;i++)
{
arr = *(uint32_t*)(0x80000000 + i);
}
DATA_COUNT is the number of DMA data words.
regards,
Nisheedh