Hi Dimitris,

Thanks for responding (posted this on my buddy's PC Terrence while he was 
logged on, apologies.)

I just got a really good environment built for compiling kernel modules right 
on the BeagleBone Black. Makefile setup nicely, generates KO files that load 
nicely using "modprobe" - all is well with the World. 

Now, to write C code. 

I have been studying the am335x TRM, specifically the Ping Pong Buffer sections 
- eventually the goal is to write a ping pong buffer that receives from SPI RX 
FIFO. 

To get me started in the right direction I am looking for simple C code to 
basically setup DMA how you suggested: 
- Allocating Buffers, Channels
- Configuring transfers

... and send a very simple transfer of data. 

I have been searching through EDMA.c and SPI code within the BBB code to see 
how they are doing it but simple C code would def. help me understand things. 

Thanks in advance for your help,


> On Dec 13, 2013, at 6:19 AM, Dimitris Boulougaris <[email protected]> 
> wrote:
> 
> Hi Terrence.
> 
> Yes i am writing a kernel module and interfacing with it from user space.
> 
> As i went through the same period like you do now i'll be glad to help you.
> 
> The first step is to allocate the buffers that the edma will use
>  source and destination buffers as well . as edma needs special buffers.
> The second step is to allocate the channels you want.
> Then comes the configuration of the transfer of each channel.
> 
> As you can understand i cant describe the hole process in detail as edma and 
> its applications are quite complicated.
> if you can be more specific ill be glad to give you more specific information.
> 
> 
>> On Fri, Dec 13, 2013 at 3:31 AM, Terrence McGuckin <[email protected]> wrote:
>> I am working on EDMA ATM as well. I was curious if you could write a little 
>> bit about how you are initializing the channels and setting up the 
>> transfers. Are you writing a kernel module for this and interfacing to it in 
>> user-space? 
>> 
>> Appreciate any insight, having a hard time digging up info on using EDMA on 
>> the Beaglebone
>> 
>>> On Thursday, November 7, 2013 10:06:53 AM UTC-5, [email protected] wrote:
>>> Greeting again everyone!.
>>> 
>>> I am using beaglebone with angstrom.
>>> 
>>> I am trying( by writing a kernel module ) to loop two dma channels together 
>>> but i cant figure out how....
>>> 
>>> Here is what i want. i want the completion of the 1st channel to trigger 
>>> the final interrupt(callback1) and also channel 2.
>>> and at the completion of channel 2 to trigger the final interrupt 
>>> (callback2) and also channel 1. etc... creating a loop between ch1 and ch2.
>>> 
>>> By linking the channels it seems that i cant  link channel 2 back to 
>>> channel 1. (
>>> 
>>> edma_link(ch1, ch2);
>>> edma_link(ch2, ch1);  system fail.
>>> 
>>> i can only link ch2 on its self 
>>> 
>>> edma_link(ch1, ch2);
>>> edma_link(ch2, ch2);  
>>> 
>>> but i dont want that.
>>> 
>>> By chaining the final interrupt is not going off. so i dont want that 
>>> either.
>>> 
>>> I tried to link  edma_link(ch1, ch2) then chain ch2 with a ch3 and have 
>>> edma_link(ch3, ch1);  
>>> 
>>> but then ch1 callback1 returns DMA_CC_ERROR with its paramset being NULL 
>>> (so the error is from that).
>>> 
>>> Any suggestions ? 
>>> 
> 

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to