AN4369: Audio options for Kinetis

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AN4369: Audio options for Kinetis

Jump to solution
1,412 Views
Mohsin455
Contributor IV

 

Hi All,

 

           Can anyone please provide me the link to the example code used in AN4369: Audio options for Kinetis ?

 

Regards,

Mohsin455

0 Kudos
1 Solution
659 Views
J2MEJediMaster
Specialist I

Search by keyword can be your friend. Anyway, here's the link:

 

http://cache.freescale.com/files/32bit/doc/app_note/AN4369SW.zip

 

---Tom

 

 

View solution in original post

0 Kudos
3 Replies
660 Views
J2MEJediMaster
Specialist I

Search by keyword can be your friend. Anyway, here's the link:

 

http://cache.freescale.com/files/32bit/doc/app_note/AN4369SW.zip

 

---Tom

 

 

0 Kudos
660 Views
Mohsin455
Contributor IV

 

Thanks finally found it. I have a few questions regarding I2S example. I think the TCD is not set properly for I2S mode. See the code below for the code marked in red which is not used for I2S mode.

 

  // fill the TCD area
  DMA_TCD0_SADDR          = (uint32_t) Audio_Source_Blk_A ; // alternated with Audio_Source_Blk_B
  DMA_TCD0_SOFF           = 2;                              // 2 byte offset
  DMA_TCD0_ATTR           = DMA_ATTR_SMOD(0) | DMA_ATTR_SSIZE(1) | DMA_ATTR_DMOD(0) | DMA_ATTR_DSIZE(1);   // no circular addressing S&D, 16 bit S&D
  DMA_TCD0_NBYTES_MLNO    = 2;                              // one  16bit sample every minor loop
  DMA_TCD0_SLAST          = 0;//-(AUDIO_SIZE*2);         // source address will always be newly written before each new start  DMA_TCD0_DADDR  
#if (AUDIO_DMA_OUTPUT == USE_PWM)
  DMA_TCD0_DADDR          = (uint32_t) &FTM2_C0V;    // the FTM Channel 0 duty value  
#elif (AUDIO_DMA_OUTPUT == USE_I2S)
  DMA_TCD0_DADDR          = (uint32_t) &I2S0_TX0;    // the FTM Channel 0 duty value
#elif (AUDIO_DMA_OUTPUT == USE_DAC)
  DMA_TCD0_DADDR          = (uint32_t) &DAC0_DAT0L;    // the FTM Channel 0 duty value
  DMA_TCD0_DOFF = 0;
  DMA_TCD0_CITER_ELINKNO = AUDIO_SIZE;              // total samples ( 128 )
  DMA_TCDO_DLASTSGA = 0;                       // no final last adjustment ( does not move )
  DMA_TCD0_CSR = DMA_CSR_INTMAJOR_MASK;  // interrupt when done  
  DMA_TCD0_BITER_ELINKNO = AUDIO_SIZE;              // no chan links, total samples ( 128)
#endif //DMA_OUTPUT 

 

Can anyone please confirm if this is correct ?

 

Thanks,

Mohsin455

0 Kudos
660 Views
ThomNet
Contributor III

Hi,

did anyone try with success to play a .wav file from an SD card directly using the AN4369 example?

Thanks for any response

Thomas

0 Kudos