Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Use of at91lib for DMA transfert with SAM3U-EK
PostPosted: Mon May 10, 2010 6:28 pm 
Offline

Joined: Mon May 10, 2010 4:35 pm
Posts: 1
Hi,

I'm playing with SAM3U-EK board and I try to do a DMA transfert from external PSRAM to LCD. I have read the documentation but it's very cloud...
I have done this:
Code:
#define DMA_buffer_size      8

int main (void) {

  SystemInit();                             /* Initialize the MCU clocks     */
  GLCD_init();                              /* Initialize the GLCD           */
  GLCD_clear(White);                        /* Clear the GLCD                */
  LED_init ();                              /* Initialize the LEDs           */

  BOARD_ConfigurePsram();

  DMAD_Initialize(DMA_CHANNEL_0);
  DMAD_Configure_Buffer(DMA_CHANNEL_0, DMA_TRANSFER_SINGLE, DMA_TRANSFER_SINGLE, 0, 0);               
  DMAD_Configure_TransferController(DMA_CHANNEL_0, DMA_buffer_size, 3, 3, 0x60000000, 0x62000000);
//0x60000000 start of PSRAM ; 0x62000000 start of LCD

  os_sys_init(init);                        /* Initialize RTX and start init */
  return 0;
}


and I do the transfer in a task:

Code:
__task void DMA(void){
   while(1){
      os_dly_wait (100);
      DMAD_BufferTransfer(DMA_CHANNEL_0, 1228800, 0, 0);
      while (!DMAD_IsFinished(DMA_CHANNEL_0));
   }
}


Could someone tell me difference between DMA_TRANSFER_SINGLE, DMA_TRANSFER_LLI, DMA_TRANSFER_RELOAD and DMA_TRANSFER_CONTIGUOUS ?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: