[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Parallella Community • View topic - DMA interrupt

DMA interrupt

Any technical questions about the Epiphany chip and Parallella HW Platform.

Moderator: aolofsson

DMA interrupt

Postby jose » Mon May 13, 2013 2:00 pm

jose
 
Posts: 5
Joined: Mon Apr 15, 2013 11:18 am

Re: DMA interrupt

Postby ysapir » Mon May 13, 2013 2:19 pm

Please make sure that the program does not exit (return from main) before the DMA process finished. In the tutorial I used the timer-based delay to make sure that this does not occur and the interrupt indeed fires.
User avatar
ysapir
 
Posts: 393
Joined: Tue Dec 11, 2012 7:05 pm

Re: DMA interrupt

Postby jose » Tue May 14, 2013 8:26 am

when I debug the program, I see that the data is transfered (the data is written is the correct place in memory). However dma_isr is not called for some reason. Furthermore, I make a second call of e_dma_copy in the program that succesfully transfers the data (I checked the memory). dma_isr is yet not called.
jose
 
Posts: 5
Joined: Mon Apr 15, 2013 11:18 am

Re: DMA interrupt

Postby jose » Tue May 14, 2013 10:15 am

Before the core executed e_dma_copy the first time, the value of E_DMA0CONFIG was 0x00000000. After the execution E_DMA0CONFIG was 0x00000043, which means IRQEN was cero.
Therefore I put in my init_interrupts function the next command: e_sysreg_write(E_DMA0CONFIG, (unsigned)0x10);. After the execution of e_dma_copy E_DMA0CONFIG was 0x00000043 again. IRQEN was overwritten to cero.
I tried also e_sysreg_write(E_DMA0CONFIG, (unsigned)0x53);. E_DMA0CONFIG was 0x00000043 after executing e_dma_copy.

Should I use assembly lenguage instead?
jose
 
Posts: 5
Joined: Mon Apr 15, 2013 11:18 am

Re: DMA interrupt

Postby jose » Tue May 14, 2013 12:04 pm

jose
 
Posts: 5
Joined: Mon Apr 15, 2013 11:18 am

Re: DMA interrupt

Postby ysapir » Tue May 14, 2013 3:28 pm

OK, thanks for the update.

Yes, you're right, that was the missing piece. As opposed to the timer mechanism, where an interrupt generation is always enabled, and occur whenever the timer reaches 0, the DMA engines behave slightly different. In order to enable DMA chaining, it was more efficient to implement an interrupt enable bit in the configuration register, then let the user reprogram the IMASK register per DMA task.
User avatar
ysapir
 
Posts: 393
Joined: Tue Dec 11, 2012 7:05 pm


Return to Epiphany and Parallella Q & A

Who is online

Users browsing this forum: No registered users and 2 guests