AnsweredAssumed Answered

Need help implementing SPORT  UART as per EE-191 on a 21371.

Question asked by davef on Jul 28, 2009
Latest reply on Jul 30, 2009 by Mitesh

I need a second UART receive section in my design. I am trying to utilize the method in EE-191 to use the SPORT in an asynchronous manner.

 

Here is my init code. This is with SPORT 3 and the input data on DAI 16.

 

// Init the serial port as a uart.

     // Route the USB UART RX lines to SPORT 3 (DAI pin to data in and FS)

     SRU (LOW, PBEN16_I);

     SRU (DAI_PB16_O, SPORT3_FS_I);

     SRU (DAI_PB16_O, SPORT3_DB_I);

 

    // Configure SPORT 3 for output to USB midi RX

     *pSPCTL3 = 0 ;

    *pDIV3 = 0x2BF;

     *pSPCTL3 = ( LAFS | LFS | FSR | ICLK | SLEN29 | SPEN_B | CKRE ) ;

    interrupt(SIG_SP3,UART1isr);

    Notes.   IRPTEN is 1
I never get interrupt when data is presented on the DAI line.
Imediately after SPEN_B is set, the SPORT 3 ch B buffer status is "Partially full". How can this remain this way with an internal clock? Whouldn't the Xfer always finish?
I routed the SPORT_3 clock out to a DAI pin and it is correct.
What am I doing wrong? Any thoughts?
Regards,
Dave

Outcomes