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.
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
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
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.
**Attention** This is a public forum