AnsweredAssumed Answered

BF532 SPORT to audio codec

Question asked by Yanko on Aug 4, 2009
Latest reply on Aug 8, 2009 by Yanko

Hi all. I have question for SPORT on BF532. I connected audio codec 1939 to SPORT0, but I don't now can one SPORT transmit and receive simultaneously on the two data chanel A an B. A - transmit, B receive or both have to be in one direction? I use DMA for configure SPORT0 as Tx mode and RX mode:

//configure DMA for SPORT0 Rx
*pDMA1_PERIPHERAL_MAP = 0x1000;
  // Configure DMA1
   // 32-bit transfers, Autobuffer mode
*pDMA1_CONFIG = WNR | WDSIZE_32 | DI_EN | FLOW_1;

*pDMA1_START_ADDR = (void *)Rx_buffer [0] ;
   // DMA inner loop count
   *pDMA1_X_COUNT = 8;
   // Inner loop address increment
   *pDMA1_X_MODIFY = 4;
  
  //configure DMA for SPORT0 Tx
   *pDMA2_PERIPHERAL_MAP = 0x2000;
  
   // Configure DMA2
   // 32-bit transfers, Autobuffer mode
   *pDMA2_CONFIG =  WDSIZE_32| FLOW_1;
   // Start address of data buffer
   *pDMA2_START_ADDR = (void *)Tx_buffer [0];
   // DMA inner loop count
   *pDMA2_X_COUNT = 8;
   // Inner loop address increment
   *pDMA2_X_MODIFY   = 4;

Outcomes