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.

MSP-FET: MSP-FET Backchannel UART - software Flow Control

Part Number: MSP-FET

Hi Everrybody,

I'm using MSP-FET with CCSv7.4 to debug & program MSP432 devices (currently MSP432P401R LaunchPad , later our own design with MSP432P401M). It's working OK.

I want to use the Backchannel UART also for debug purposes. Target MCLK is 16 MHz, 28800 Baud is working well without Flow Control. According to the documentation (SLAU647K) higher speed is only available with Flow Control or handshaking.

Flow Control means hardware flow control signals (RTS and CTS)? Or software Flow Control is also available with XONN/XOFF?

Is any eUSCI supports CTS and RTS signals?

Maybe somebody can help me!

Thanks,

Zoltan

  • The flow control is referring to the CTS and RTS signals found on the FET.  The eUSCI does not support these signals and you would need to do this in software and utilize the GPIO.  

    Chris

  • Zoltan,

      Flow control here means RTS/CTS, which would be implement in Software on the MCU side since there's no hardware support for these signals in the eUSCI peripheral.  I see the flow-control recommendation in SLAU647 as you mention, but I think given your use of a >8MHz MCLK, you may be able to get higher speeds without flow control (this may be a limitation of the MSP-FET).  I tried a small PC-echo example using the MSP432P401 LaunchPad at 115200 baud and had no difficulties or lost characters that my serial port program (TeraTerm) could see.  Here's the code snippet below, adapted from the uart_pc_echo_12mhz_brclk example in the SimpleLink SDK.  

    Hope this helps.

    -Bob L.

    // Echoes back characters via a PC serial Port configured to 115200 

    // 8b/no Parity/ 1 Stop/ no flow control

    const eUSCI_UART_Config uartConfig =
    {
    EUSCI_A_UART_CLOCKSOURCE_SMCLK, // SMCLK Clock Source
    6, // BRDIV = 6
    8, // UCxBRF = 2
    0, // UCxBRS = 0
    EUSCI_A_UART_NO_PARITY, // No Parity
    EUSCI_A_UART_LSB_FIRST, // LSB First
    EUSCI_A_UART_ONE_STOP_BIT, // One stop bit
    EUSCI_A_UART_MODE, // UART mode
    EUSCI_A_UART_OVERSAMPLING_BAUDRATE_GENERATION // Oversampling
    };

    int main(void)
    {
      MAP_WDT_A_holdTimer();   /* Halting WDT */

      /* Selecting P1.2 and P1.3 in UART mode */
      MAP_GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P1,
      GPIO_PIN2 | GPIO_PIN3, GPIO_PRIMARY_MODULE_FUNCTION);

      /* Setting DCO to 12MHz */
      CS_setDCOCenteredFrequency(CS_DCO_FREQUENCY_12);

      /* Configuring UART Module */
      MAP_UART_initModule(EUSCI_A0_BASE, &uartConfig);

      /* Enable UART module */
      MAP_UART_enableModule(EUSCI_A0_BASE);

      /* Enabling interrupts */
      MAP_UART_enableInterrupt(EUSCI_A0_BASE, EUSCI_A_UART_RECEIVE_INTERRUPT);
      MAP_Interrupt_enableInterrupt(INT_EUSCIA0);
      MAP_Interrupt_enableSleepOnIsrExit();
      MAP_Interrupt_enableMaster(); 

      while(1){
        MAP_PCM_gotoLPM0();
      }
    }

    /* EUSCI A0 UART ISR - Echoes data back to PC host */
    void EUSCIA0_IRQHandler(void)
    {
      uint32_t status = MAP_UART_getEnabledInterruptStatus(EUSCI_A0_BASE);

      MAP_UART_clearInterruptFlag(EUSCI_A0_BASE, status);
      if(status & EUSCI_A_UART_RECEIVE_INTERRUPT_FLAG) {
        MAP_UART_transmitData(EUSCI_A0_BASE, MAP_UART_receiveData(EUSCI_A0_BASE));
      }

    }

  • Hi Chris!

    Unfortunatelly I don't have free GPIOs for CTS and RTS. Nevermind, I will use the MSP-FET backchannel UART w/o Flow-Control and max. 28800 Baud.

    Thanks,

    Zoltan

  • Hi Bob,
    If I use the MSP432P401 LaunchPad and the built-in UART of XDS110 debugger than i can reach 115200 Baud without any problem (w/o Flow-Control).
    If I want to debug our own HW than it is neccessary to use the MSP-FET. I can't use Flow-Control because our HW has no any free GPIO for CTS/RTS. I've already tried higher speeds than 28800 Baud but I've seen character lost immediatelly.
    I had a hope that MSP-FET support soft Flow-Control also sending XON/XOFF chars!

    Thanks for your help!
    Zoltan
  • You might have an issue with the right kind of cabling, but have you considered using the XDS110 from a LaunchPad as your FET? The LaunchPad has a 10-pin ARM mini-connector on it if your own HW has an equivalent connector (or one that could be adapted to it).
    -Bob L.
  • Zoltan,

    You are using UART for debugging with target in free running mode, or with active breakpoint debugging? If we are talking about free running target than going up to 1 Mbps should not be a problem. For example my flasher can transfer on 1 Mbps with 2 active UART / CDC bridges without lost characters. For me, even 115200 is too slow.

    BTW, mailbox system doesn't need any setup, extra wires or / and flow control, and there will not be lost characters. It is perfect interface for log channel.

  • Zoltan,
    Were you able to solve your issues given the information provided in these responses? I haven't seen any replies from you in awhile.
    -Bob L.

**Attention** This is a public forum