Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

LAUNCHXL-F28379D: SCI looping errors

$
0
0

Part Number:LAUNCHXL-F28379D

I have SCI-B setup to transmit and receive FIFO I am using SCIA and C successfully with the same setup but B will not write from RXBUF to TXBUF.  I have these pin MUX and GMUXs and have linked those ports with a jumper wire:

EALLOW;

GpioCtrlRegs.GPAMUX2.bit.GPIO18 = 2;
    GpioCtrlRegs.GPAMUX2.bit.GPIO19 = 2;
    GpioCtrlRegs.GPAGMUX2.bit.GPIO18 = 0;
    GpioCtrlRegs.GPAGMUX2.bit.GPIO19 = 0;

EDIS;

The txbuf can be written to, but the RXBUF cannot receive that result and is stuck on a value assigned at initialization(76) these are my setup configs

Fifo 

void scib_fifo_init()
{   //initializes first in first out buffer for TX and RX
    ScibRegs.SCIFFTX.all = 0xE040;
    /*Bit 15 = 1:  SCI FIFO can resume transmit or receive. SCIRST should be 1 even for Autobaud logic to work.
    Bit 14 = 1: SCI FIFO enhancements are enabled
    Bit13 = 1:  Re-enable transmit FIFO operation
    Bit 12-8 = 0: FIFO is empty
    Bit 7 = 0: TXFIFO interrupt has not occurred, read-only bit
    Bit 6 = 1:  Write 0 has no effect on TXFIFINT flag bit, Bit reads back a zero
    Bit 5 = 0: TX FIFO interrupt based on TXFFIL match (less than or equal to) is disabled
    Bit 4-0 = 0: TXFFIL N/A
    */
    ScibRegs.SCIFFRX.all = 0x2044;
    /*Bit 15 = 0:    Receive FIFO has not overflowed, read-only bit
    Bit 14 = 0: Write 0 has no effect on RXFFOVF flag bit, Bit reads back a zero
    Bit13 = 1:   Re-enable receive FIFO operation
    Bit 12-8 = 0: FIFO is empty
    Bit 7 = 0: RXFIFO interrupt has not occurred, read-only bit
    Bit 6 = 1:   Write 1 to clear RXFFINT flag in bit 7
    Bit 5 = 0:  RX FIFO interrupt based on RXFFIL match (greater than or equal to) will be disabled
    Bit 4-0 = 0: RXFFIL N/A
    */
    ScibRegs.SCIFFCT.all = 0x0;
    /*Bit 15 = 0: Auto-baud detection is not complete. "A","a" character has not been received successfully.
    Bit 14 = 0:  Write 0 has no effect on ABD flag bit. Bit reads back a zero.
    Bit 13 = 0:   Disables auto-baud alignment
    Bit 12-8 = 0: Reserved
    Bit 7-0 = 0: FFTXDLY Reset set pause between character detections on the RX and TX FIFOs 0-> 0 baud delay
    */
    }

init

void scib_init()//used for usb transfer if broken look at example code in TI C2000ware
{
   // 1 stop bit,  No loopback, No parity,8 char bits, async mode,
   // idle-line protocol
   ScibRegs.SCICCR.all =0x0007;
   //SETS CHAR LENGTH TO 8 BIT FOR SCI COMMUNICATIONS
   // enable TX, RX, internal SCICLK, Disable RX ERR, SLEEP, TXWAKE
   ScibRegs.SCICTL1.all =0x0003;
   //Bit 0 = 1: Send received characters to SCIRXEMU and SCIRXBUF
   //Bit 1 = 1: Transmitter enabled
   ScibRegs.SCICTL2.bit.TXINTENA =1;
   //TXINTENA ENABLES TX INTERRUPTS AND IS ASSOCIATED WITH CCTL2 BIT 0
   ScibRegs.SCICTL2.bit.RXBKINTENA =1;
   //RXBKINTENA ENABLES RX INTERRUPTS AND IS ASSOCIATED WITH CCTL2 BIT 1
   //SET Baud 9600
   ScibRegs.SCIHBAUD.all = 0x0002;
   ScibRegs.SCILBAUD.all = 0x008B;
   ScibRegs.SCICTL1.all =0x0023;
   // Relinquish SCI from Reset
    return;
}
Is there any reason that the same init methods just changing the Scix reg that is referenced would not work on SCI B but would work on C and A?  or is there something in any setup that I have missed

Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>