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: i2s does not work
PostPosted: Tue Dec 01, 2009 12:52 am 
Offline

Joined: Tue Jan 20, 2009 1:47 am
Posts: 1
Hi all,

AT91SAM7S64, GCC, FreeRTOS 5.3.

Cannot get i2s to send any data, clk works. For the beginning Just want to check if any data is going out:

Code:
  AT91C_BASE_PIOA->PIO_PDR = AT91C_PA15_TF | AT91C_PA16_TK | AT91C_PA17_TD;               // Disable pins in PIO.
  AT91C_BASE_PIOA->PIO_ASR = AT91C_PA15_TF | AT91C_PA16_TK | AT91C_PA17_TD;               // Pins work in peripheral A.
  AT91C_BASE_PMC->PMC_PCER = 0x1 << AT91C_ID_SSC;                                         // Enable clock on SSC.


  AT91C_BASE_AIC->AIC_IECR = 0x1 << AT91C_ID_SSC;                                         // Enable SSC irq on AIC.
  AT91C_BASE_SSC->SSC_CR   = AT91C_SSC_RXDIS | AT91C_SSC_TXEN | AT91C_SSC_SWRST;          // Disable RX, enable TX, perform sw reset.
  AT91C_BASE_SSC->SSC_CMR  = (18432000 / (2 * (8 * 2) * 8000)) + 1;

  AT91C_BASE_SSC->SSC_TCMR = (AT91C_SSC_CKS_DIV & AT91C_SSC_CKS) |
                             (AT91C_SSC_CKO & AT91C_SSC_CKO_CONTINOUS) |
                             (5 << 8) | (8 << 24);
  AT91C_BASE_SSC->SSC_TFMR = 7;

  while (1)
    {
      data++;     
      AT91C_BASE_SSC->SSC_THR = data;


      while (!(AT91C_BASE_SSC->SSC_SR & AT91C_SSC_TXRDY));

    }


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: Bing [Bot] and 2 guests


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: