This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/LAUNCHXL-F28379D: Using SCIB in Idle-Line Multiprocessor Mode for programming booster pack over UART

Part Number: LAUNCHXL-F28379D
Other Parts Discussed in Thread: BOOSTXL-CC3120MOD

Tool/software: Code Composer Studio

Hello, I'm trying to write some code that will be able to program a Boostxl-cc3120MOD over UART using my launchpad. To do this I need to configure SCIB to communicate through pins 18 & 19 in Idle-Line Multiprocessor Mode. I am having some trouble with the SCI modules not being able to output anything through the pins on the launchpad, using SCIA though the mini USB works fine however. I posted my code bellow, any suggestions as to what I'm missing would be appreciated. 

Cheers!

Device_init();
    SysCtl_setLowSpeedClock(SYSCTL_LSPCLK_PRESCALE_1);

    //
    // Disable pin locks and enable internal pullups.
    //
    Device_initGPIO();

    //
    // SCI Rx pin.
    //
    GPIO_setMasterCore(19, GPIO_CORE_CPU1);
    GPIO_setPinConfig(GPIO_19_SCIRXDB);
    GPIO_setDirectionMode(19, GPIO_DIR_MODE_IN);
    GPIO_setPadConfig(19, GPIO_PIN_TYPE_STD);
    GPIO_setQualificationMode(19, GPIO_QUAL_ASYNC);

    //
    // SCI Tx pin.
    //
    GPIO_setMasterCore(18, GPIO_CORE_CPU1);
    GPIO_setPinConfig(GPIO_18_SCITXDB);
    GPIO_setDirectionMode(18, GPIO_DIR_MODE_OUT);
    GPIO_setPadConfig(18, GPIO_PIN_TYPE_STD);
    GPIO_setQualificationMode(18, GPIO_QUAL_ASYNC);

    //
    // Initialize interrupt controller and vector table.
    //
    Interrupt_initModule();
    Interrupt_initVectorTable();

    //
    // Initialize SCIA and its FIFO.
    //
    SCI_performSoftwareReset(SCIB_BASE);

    //
    // Configure SCIA for echoback.
    //
    HWREGH(SCIB_BASE + SCI_O_CCR) &= ~(SCI_CCR_ADDRIDLE_MODE);
    SCI_setConfig(SCIB_BASE, DEVICE_LSPCLK_FREQ, 921600, (SCI_CONFIG_WLEN_8 |
                                                        SCI_CONFIG_STOP_ONE |
                                                        SCI_CONFIG_PAR_NONE));
    SCI_resetChannels(SCIB_BASE);
    SCI_resetRxFIFO(SCIB_BASE);
    SCI_resetTxFIFO(SCIB_BASE);
    SCI_clearInterruptStatus(SCIB_BASE, SCI_INT_TXFF | SCI_INT_RXFF);
    SCI_enableModule(SCIB_BASE);
    SCI_performSoftwareReset(SCIB_BASE);


    msg = 'A';
    HWREGH(SCIB_BASE + SCI_O_CTL1) |= (SCI_CTL1_TXWAKE);
    receivedChar[0] = (HWREGH(SCIB_BASE + SCI_O_CTL1));
    receivedChar[1] = HWREGH(SCIB_BASE + SCI_O_CCR);

    while(loopCounter)
    {
        HWREGH(SCIB_BASE + SCI_O_CTL1) = receivedChar[0];
        SCI_writeCharBlockingFIFO(SCIB_BASE, msg);
        while(HWREGH(SCIB_BASE + SCI_O_CTL1) == receivedChar[0]){}

        if(SCI_getRxFIFOStatus(SCIB_BASE)!=SCI_FIFO_RX0)
        {
            receivedChar[0] = SCI_readCharBlockingFIFO(SCIB_BASE);
            receivedChar[1] = SCI_readCharBlockingFIFO(SCIB_BASE);

            if(receivedChar[0]==0x00 && receivedChar[1]==0xCC)
            {
                loopCounter = 0;
            }
        }
    }
    SCI_performSoftwareReset(SCIB_BASE);
    ESTOP0;

  • hi Benjamin,

    So i believe you are using the J1J3-J2J4 headers for the boosterpack connection ?

    Is the device not receiving anything or is the TX to the boosterpack the issue?

    Does it get stuck somewhere ?

    What is not working when moving from SCIA to B?

    Regards.

  • Hey,

    Yes, I am using J1-4 for the connection. Sorry if I wasn't clear but the main problem right now is that when using SCIB, the Tx line (pin 4) does not seem to be transmitting at all, it is just held at ~3.3V when I try to communicate with the booster pack. This is confirmed using a scope. I also tried SCIC but got the same result. SCIA works fine when sending the signal through the FTDI to the USB (I can communicate with my windows app). So I was wondering if I was missing something that would get the SCIB Tx to send signals through the pins on the board.

    Thanks!

  • Hey,

    Just pinging the thread

  • hi ,

    Benjamin Maxwell said:
    SCIB, the Tx line (pin 4) does not seem to be transmitting at all, it is just held at ~3.3V when I try to communicate with the booster pack.

    Are the GPIOS being used for SCI B or SCIC being held high by the CC32xx by any chance ?

    Benjamin Maxwell said:
    So I was wondering if I was missing something that would get the SCIB Tx to send signals through the pins on the board.

    I just tried to use an internal loopback example with SCIB without using external GPIOs and it works fine .

    I only changed everything to use SCIB rather than SCIA.

    So the only changes i see now are the GPIOs which are as per the expected gpio map . 

    Regards.

  • I managed to get it to start sending, thanks!

    I'm still not able to send a break signal by setting the Tx wake bit before sending though as per http://www.ti.com/lit/ug/spruhm8i/spruhm8i.pdf section 19.8.2.

  • hi,

    Are you following the steps of a don't care byte has to be written to SCITXBUF after setting TXWAKE, and before sending the address, so as to transmit the idle time?

    Regards.

  • I think I am, you can correct me if I'm doing it wrong: I set the idle/addr bit to 0 (idle line mode) then I reset the channels, the FIFO buffers, clear interrupts and a software reset, next I set the TWAKE bit, then I write an arbitrary byte to the TXBUF register and wait for the TXWAKE bit to be set back to zero. 

    When looking at the TX pin on the board with a scope, the stays at high logic (3V) i.e. no idle time. If I configure the TX pin to simply be a GPIO that I pull low I can get an a signal back from my booster pack after a rest but I'm having problems reading the signal on my C2000 board. Further details on this are here https://e2e.ti.com/support/wireless-connectivity/wifi/f/968/p/861523/3194071#3194071.

    Thanks

  • hi Benjamin,

    Apologies for the late response.

    I am checking with the internal team for inputs on this.

    Will reply once I hear back from them.

    Regards.

  • hi Benjamin ,

    Just wanted to check on you if you were able to make some progress.

    There has been some delay internally to get some data.

    Regards.

  • Hi Benjamin,

    Block start is used to send idle time (SCITXD GPIO being high) for exactly just more than 10 bit period since users may not unnecessarily send longer idle times with external software timers. Idle time means SCITXD/SCIRXD high. Your observation of 3V after TXWAKE is correct and expected.

    On the other hand, Break detect on the RX side is to detect any bus hang/error scenario where SCIRXD GPIO is stuck at "0" for longer than 10bit periods. Both are different from each other. 

    Please try filling the TXFIFO with a dummy byte followed by address byte. You will see that after TXWAKE bit going low, after ~11 bit periods of idle (GPIO=HIGH) start and address byte will be sent by the SCITX module. On the SCIRX side even though Sleep bit is set, will get waked up by this block start to receive the address byte and interrupt will get triggered so that it compare it with its own address in multiprocessor mode.

    Regards,

    Yogeshwaran S