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.
Tool/software: Code Composer Studio
Hello,
In relation to the previous question here.
The attached program is based on the UART echo back example on pins P2.0, P2.1 from TIREX. (for the msp430fr5969, because currently there isn't one for the msp430fr5994 at TIREX).
That program is working well on the msp430fr5994 launchpad but not on my production board which currently doesn't have an external oscillator (actually it should have also external oscillator which identical to the one on the launchpad but for now we have some problem with that) so we just want to check the UART using the internal on-chip oscillator.
Is there an example of how to work with the UART but using the on-chip internal Oscillator?
Using driver lib.
Didn't find one on TIREX for the msp430fr5994, not for the MSP430fr5969.
Code:
/* --COPYRIGHT--,BSD * Copyright (c) 2017, Texas Instruments Incorporated * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of Texas Instruments Incorporated nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * --/COPYRIGHT--*/ //****************************************************************************** //! EUSCI_A0 External Loopback test using EUSCI_A_UART_init API //! //! Description: This demo connects TX to RX of the MSP430 UART //! The example code shows proper initialization of registers //! and interrupts to receive and transmit data. //! //! ACLK = BRCLK = 32.768kHz, MCLK = SMCLK = DCO = ~1MHz //! //! //! Tested on MSP430FR5969 //! ----------------- //! RST -| P2.0/UCA0TXD|----| //! | | | //! | | | //! | P2.1/UCA0RXD|----| //! | | //! //! This example uses the following peripherals and I/O signals. You must //! review these and change as needed for your own board: //! - UART peripheral //! - GPIO Port peripheral (for UART pins) //! - UCA0TXD //! - UCA0RXD //! //! This example uses the following interrupt handlers. To use this example //! in your own application you must add these interrupt handlers to your //! vector table. //! - USCI_A0_VECTOR. //****************************************************************************** #include "driverlib.h" uint16_t i; uint8_t RXData = 0, TXData = 0; uint8_t check = 0; void main(void) { // stop watchdog WDT_A_hold(WDT_A_BASE); // LFXT Setup //Set PJ.4 and PJ.5 as Primary Module Function Input. /* * Select Port J * Set Pin 4, 5 to input Primary Module Function, LFXT. */ GPIO_setAsPeripheralModuleFunctionInputPin( GPIO_PORT_PJ, GPIO_PIN4 + GPIO_PIN5, GPIO_PRIMARY_MODULE_FUNCTION ); //Set DCO frequency to 1 MHz CS_setDCOFreq(CS_DCORSEL_0,CS_DCOFSEL_0); //Set external clock frequency to 32.768 KHz CS_setExternalClockSource(32768,0); //Set ACLK=LFXT CS_initClockSignal(CS_ACLK,CS_LFXTCLK_SELECT,CS_CLOCK_DIVIDER_1); //Set SMCLK = DCO with frequency divider of 1 CS_initClockSignal(CS_SMCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_1); //Set MCLK = DCO with frequency divider of 1 CS_initClockSignal(CS_MCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_1); //Start XT1 with no time out CS_turnOnLFXT(CS_LFXT_DRIVE_0); // Configure UART pins //Set P2.0 and P2.1 as Secondary Module Function Input. /* * Select Port 2d * Set Pin 0, 1 to input Secondary Module Function, (UCA0TXD/UCA0SIMO, UCA0RXD/UCA0SOMI). */ GPIO_setAsPeripheralModuleFunctionInputPin( GPIO_PORT_P2, GPIO_PIN0 + GPIO_PIN1, GPIO_SECONDARY_MODULE_FUNCTION ); /* * Disable the GPIO power-on default high-impedance mode to activate * previously configured port settings */ PMM_unlockLPM5(); // Configure UART EUSCI_A_UART_initParam param = {0}; param.selectClockSource = EUSCI_A_UART_CLOCKSOURCE_ACLK; param.clockPrescalar = 3; param.firstModReg = 0; param.secondModReg = 92; param.parity = EUSCI_A_UART_NO_PARITY; param.msborLsbFirst = EUSCI_A_UART_LSB_FIRST; param.numberofStopBits = EUSCI_A_UART_ONE_STOP_BIT; param.uartMode = EUSCI_A_UART_MODE; param.overSampling = EUSCI_A_UART_LOW_FREQUENCY_BAUDRATE_GENERATION; if (STATUS_FAIL == EUSCI_A_UART_init(EUSCI_A0_BASE, ¶m)) { return; } EUSCI_A_UART_enable(EUSCI_A0_BASE); EUSCI_A_UART_clearInterrupt(EUSCI_A0_BASE, EUSCI_A_UART_RECEIVE_INTERRUPT); // Enable USCI_A0 RX interrupt EUSCI_A_UART_enableInterrupt(EUSCI_A0_BASE, EUSCI_A_UART_RECEIVE_INTERRUPT); // Enable interrupt __enable_interrupt(); while (1) { TXData = RXData; // Increment TX data // Load data onto buffer EUSCI_A_UART_transmitData(EUSCI_A0_BASE, TXData); while(check != 1); check = 0; } } //****************************************************************************** // //This is the USCI_A0 interrupt vector service routine. // //****************************************************************************** #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__) #pragma vector=USCI_A0_VECTOR __interrupt #elif defined(__GNUC__) __attribute__((interrupt(USCI_A0_VECTOR))) #endif void USCI_A0_ISR(void) { switch(__even_in_range(UCA0IV,USCI_UART_UCTXCPTIFG)) { case USCI_NONE: break; case USCI_UART_UCRXIFG: RXData = EUSCI_A_UART_receiveData(EUSCI_A0_BASE); check =1; break; case USCI_UART_UCTXIFG: break; case USCI_UART_UCSTTIFG: break; case USCI_UART_UCTXCPTIFG: break; } }
Thanks.
Hi Ron,
I suspect what is happening is without the LFXT 32KHz crystal, the clock fault detection is switching to the LFMODCLK at powerup. The LFMODCLK is 1/128 of the MODOSC clock, which is centered around 4.8MHz and can vary quite a bit. Assuming it is 4.8MHz on your device the ACLK will be ~ 37.5Khz, not 32.768Khz..
Despite the clock frequency, you should be able to perform a loop-back test. Tie the TXD and RXD together and send some bytes out. You should receive the same without error since both transmit and receiving clocks are derived from the same ACLK source.
If you want to confirm communications with an external device, you will have to output the ACLK on on P2.0 and measure with an oscilloscope or logic probe to confirm the frequency. You can then adjust the baud rate parameters to generate your target baud rate and match the baud rate of the external device.
Hi Dennis,
Thanks for the response, but in the first step, I just need an example of how to work completely with the internal oscillator.
How to set the program to work with the internal oscillator and send some data via UART? (any common baud rate (9600, 19200, 115200, ...) will be ok)
The example can be may with the attached code or with any other example which demonstrates how to do that.
Thanks
Which internal oscillator? Low-speed (30-mumble kHz) or high-speed (DCO=1MHz)? You can't get 115200 with the low-speed oscillator. Even 9600 is kinda marginal. And as Dennis pointed out, the low-speed internal oscillator isn't so stable.
If you're just looking for a UART link to get you going, I recommend the DCO via EUSCI_A_UART_CLOCKSOURCE_SMCLK, which you've set to 1MHz. Set ClockPrescalar = (1000000UL/19200UL) for 19200bps.
I will put things in another way, let's say I have a production board which only contains the msp430fr5994 chip (and power supplies but no external oscillator on the board).
Can I operate the UART properly in such a scenario? (any known baud will be OK)
If yes, Is there an example of this in TIREX?
I don't see a Driverlib example using the UART with the DCO (SMCLK).
I do believe that the changes I suggested will get you going.
I don't see any DriverLib example that is using DCO, even without UART (actually the TIREX for msp430fr5994 is quite lack with examples..)
The code you posted uses the DCO for MCLK/SMCLK, though it uses ACLK for the UART. I was suggesting you change that program to use SMCLK for the UART. Or maybe I don't understand your point.
I agree that the TIREX Driverllib example set for the FR5994 is pretty thin. If you've installed MSP430Ware, there are more (but not many more) down in the driverlib/examples directory.
Thanks.
I'm not sure how to change the code that it will use SMCLK instead of DCO (MCLK/SMCLK).
I tried to change from this (line 121):
param.selectClockSource = EUSCI_A_UART_CLOCKSOURCE_ACLK;
to this:
param.selectClockSource = EUSCI_A_UART_CLOCKSOURCE_SMCLK;
And added constant sending (instead of the just echo back that was before)
The result of this is that I'm getting 0xFF to terminal (for each sending cycle). Sending from terminal to msp not seems to raise any interrupt on the msp.
The entire code is attached.
Code:
/* --COPYRIGHT--,BSD * Copyright (c) 2017, Texas Instruments Incorporated * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of Texas Instruments Incorporated nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * --/COPYRIGHT--*/ //****************************************************************************** //! EUSCI_A0 External Loopback test using EUSCI_A_UART_init API //! //! Description: This demo connects TX to RX of the MSP430 UART //! The example code shows proper initialization of registers //! and interrupts to receive and transmit data. //! //! ACLK = BRCLK = 32.768kHz, MCLK = SMCLK = DCO = ~1MHz //! //! //! Tested on MSP430FR5969 //! ----------------- //! RST -| P2.0/UCA0TXD|----| //! | | | //! | | | //! | P2.1/UCA0RXD|----| //! | | //! //! This example uses the following peripherals and I/O signals. You must //! review these and change as needed for your own board: //! - UART peripheral //! - GPIO Port peripheral (for UART pins) //! - UCA0TXD //! - UCA0RXD //! //! This example uses the following interrupt handlers. To use this example //! in your own application you must add these interrupt handlers to your //! vector table. //! - USCI_A0_VECTOR. //****************************************************************************** #include "driverlib.h" volatile uint32_t i; uint8_t RXData = 0, TXData = 0; void main(void) { // stop watchdog WDT_A_hold(WDT_A_BASE); // LFXT Setup //Set PJ.4 and PJ.5 as Primary Module Function Input. /* * Select Port J * Set Pin 4, 5 to input Primary Module Function, LFXT. */ GPIO_setAsPeripheralModuleFunctionInputPin( GPIO_PORT_PJ, GPIO_PIN4 + GPIO_PIN5, GPIO_PRIMARY_MODULE_FUNCTION ); //Set DCO frequency to 1 MHz CS_setDCOFreq(CS_DCORSEL_0,CS_DCOFSEL_0); //Set external clock frequency to 32.768 KHz CS_setExternalClockSource(32768,0); //Set ACLK=LFXT CS_initClockSignal(CS_ACLK,CS_LFXTCLK_SELECT,CS_CLOCK_DIVIDER_1); //Set SMCLK = DCO with frequency divider of 1 CS_initClockSignal(CS_SMCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_1); //Set MCLK = DCO with frequency divider of 1 CS_initClockSignal(CS_MCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_1); //Start XT1 with no time out CS_turnOnLFXT(CS_LFXT_DRIVE_0); // Configure UART pins //Set P2.0 and P2.1 as Secondary Module Function Input. /* * Select Port 2d * Set Pin 0, 1 to input Secondary Module Function, (UCA0TXD/UCA0SIMO, UCA0RXD/UCA0SOMI). */ GPIO_setAsPeripheralModuleFunctionInputPin( GPIO_PORT_P2, GPIO_PIN0 + GPIO_PIN1, GPIO_SECONDARY_MODULE_FUNCTION ); /* * Disable the GPIO power-on default high-impedance mode to activate * previously configured port settings */ PMM_unlockLPM5(); // Configure UART EUSCI_A_UART_initParam param = {0}; //param.selectClockSource = EUSCI_A_UART_CLOCKSOURCE_ACLK; param.selectClockSource = EUSCI_A_UART_CLOCKSOURCE_SMCLK; param.clockPrescalar = 3; param.firstModReg = 0; param.secondModReg = 92; param.parity = EUSCI_A_UART_NO_PARITY; param.msborLsbFirst = EUSCI_A_UART_LSB_FIRST; param.numberofStopBits = EUSCI_A_UART_ONE_STOP_BIT; param.uartMode = EUSCI_A_UART_MODE; param.overSampling = EUSCI_A_UART_LOW_FREQUENCY_BAUDRATE_GENERATION; if (STATUS_FAIL == EUSCI_A_UART_init(EUSCI_A0_BASE, ¶m)) { return; } EUSCI_A_UART_enable(EUSCI_A0_BASE); EUSCI_A_UART_clearInterrupt(EUSCI_A0_BASE, EUSCI_A_UART_RECEIVE_INTERRUPT); // Enable USCI_A0 RX interrupt EUSCI_A_UART_enableInterrupt(EUSCI_A0_BASE, EUSCI_A_UART_RECEIVE_INTERRUPT); // Enable interrupt __enable_interrupt(); while (1) { TXData = RXData; // Increment TX data // Load data onto buffer EUSCI_A_UART_transmitData(EUSCI_A0_BASE, TXData); EUSCI_A_UART_transmitData(EUSCI_A0_BASE, 'T'); EUSCI_A_UART_transmitData(EUSCI_A0_BASE, 'E'); EUSCI_A_UART_transmitData(EUSCI_A0_BASE, 'S'); EUSCI_A_UART_transmitData(EUSCI_A0_BASE, 'T'); // Delay for(i=100000; i>0; i--); continue; } } //****************************************************************************** // //This is the USCI_A0 interrupt vector service routine. // //****************************************************************************** #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__) #pragma vector=USCI_A0_VECTOR __interrupt #elif defined(__GNUC__) __attribute__((interrupt(USCI_A0_VECTOR))) #endif void USCI_A0_ISR(void) { switch(__even_in_range(UCA0IV,USCI_UART_UCTXCPTIFG)) { case USCI_NONE: break; case USCI_UART_UCRXIFG: RXData = EUSCI_A_UART_receiveData(EUSCI_A0_BASE); break; case USCI_UART_UCTXIFG: break; case USCI_UART_UCSTTIFG: break; case USCI_UART_UCTXCPTIFG: break; } }
You also need to set ClockPrescalar = (1000000UL/19200UL) for 19200bps. The 1000000UL is 1MHz, and the 19200 is 19200bps.
It's probably also a good idea to set secondModReg = 0, but that may or may not get in the way.
[Edit: Clarified slightly.]
Work :) Great
Thanks!
To make the thread complete, the entire code is attached.
Code:
This is for 19200 8N1
/* --COPYRIGHT--,BSD * Copyright (c) 2017, Texas Instruments Incorporated * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of Texas Instruments Incorporated nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * --/COPYRIGHT--*/ //****************************************************************************** //! EUSCI_A0 External Loopback test using EUSCI_A_UART_init API //! //! Description: This demo connects TX to RX of the MSP430 UART //! The example code shows proper initialization of registers //! and interrupts to receive and transmit data. //! //! ACLK = BRCLK = 32.768kHz, MCLK = SMCLK = DCO = ~1MHz //! //! //! Tested on MSP430FR5969 //! ----------------- //! RST -| P2.0/UCA0TXD|----| //! | | | //! | | | //! | P2.1/UCA0RXD|----| //! | | //! //! This example uses the following peripherals and I/O signals. You must //! review these and change as needed for your own board: //! - UART peripheral //! - GPIO Port peripheral (for UART pins) //! - UCA0TXD //! - UCA0RXD //! //! This example uses the following interrupt handlers. To use this example //! in your own application you must add these interrupt handlers to your //! vector table. //! - USCI_A0_VECTOR. //****************************************************************************** #include "driverlib.h" volatile uint32_t i; uint8_t RXData = 0, TXData = 0; void main(void) { // stop watchdog WDT_A_hold(WDT_A_BASE); // LFXT Setup //Set PJ.4 and PJ.5 as Primary Module Function Input. /* * Select Port J * Set Pin 4, 5 to input Primary Module Function, LFXT. */ GPIO_setAsPeripheralModuleFunctionInputPin( GPIO_PORT_PJ, GPIO_PIN4 + GPIO_PIN5, GPIO_PRIMARY_MODULE_FUNCTION ); //Set DCO frequency to 1 MHz CS_setDCOFreq(CS_DCORSEL_0,CS_DCOFSEL_0); //Set external clock frequency to 32.768 KHz CS_setExternalClockSource(32768,0); //Set ACLK=LFXT CS_initClockSignal(CS_ACLK,CS_LFXTCLK_SELECT,CS_CLOCK_DIVIDER_1); //Set SMCLK = DCO with frequency divider of 1 CS_initClockSignal(CS_SMCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_1); //Set MCLK = DCO with frequency divider of 1 CS_initClockSignal(CS_MCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_1); //Start XT1 with no time out CS_turnOnLFXT(CS_LFXT_DRIVE_0); // Configure UART pins //Set P2.0 and P2.1 as Secondary Module Function Input. /* * Select Port 2d * Set Pin 0, 1 to input Secondary Module Function, (UCA0TXD/UCA0SIMO, UCA0RXD/UCA0SOMI). */ GPIO_setAsPeripheralModuleFunctionInputPin( GPIO_PORT_P2, GPIO_PIN0 + GPIO_PIN1, GPIO_SECONDARY_MODULE_FUNCTION ); /* * Disable the GPIO power-on default high-impedance mode to activate * previously configured port settings */ PMM_unlockLPM5(); // Configure UART EUSCI_A_UART_initParam param = {0}; //param.selectClockSource = EUSCI_A_UART_CLOCKSOURCE_ACLK; param.selectClockSource = EUSCI_A_UART_CLOCKSOURCE_SMCLK; // param.clockPrescalar = 3; param.clockPrescalar = (1000000UL/19200UL); param.firstModReg = 0; param.secondModReg = 92; param.parity = EUSCI_A_UART_NO_PARITY; param.msborLsbFirst = EUSCI_A_UART_LSB_FIRST; param.numberofStopBits = EUSCI_A_UART_ONE_STOP_BIT; param.uartMode = EUSCI_A_UART_MODE; param.overSampling = EUSCI_A_UART_LOW_FREQUENCY_BAUDRATE_GENERATION; if (STATUS_FAIL == EUSCI_A_UART_init(EUSCI_A0_BASE, ¶m)) { return; } EUSCI_A_UART_enable(EUSCI_A0_BASE); EUSCI_A_UART_clearInterrupt(EUSCI_A0_BASE, EUSCI_A_UART_RECEIVE_INTERRUPT); // Enable USCI_A0 RX interrupt EUSCI_A_UART_enableInterrupt(EUSCI_A0_BASE, EUSCI_A_UART_RECEIVE_INTERRUPT); // Enable interrupt __enable_interrupt(); while (1) { TXData = RXData; // Increment TX data // Load data onto buffer EUSCI_A_UART_transmitData(EUSCI_A0_BASE, TXData); EUSCI_A_UART_transmitData(EUSCI_A0_BASE, 'T'); EUSCI_A_UART_transmitData(EUSCI_A0_BASE, 'E'); EUSCI_A_UART_transmitData(EUSCI_A0_BASE, 'S'); EUSCI_A_UART_transmitData(EUSCI_A0_BASE, 'T'); // Delay for(i=100000; i>0; i--); continue; } } //****************************************************************************** // //This is the USCI_A0 interrupt vector service routine. // //****************************************************************************** #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__) #pragma vector=USCI_A0_VECTOR __interrupt #elif defined(__GNUC__) __attribute__((interrupt(USCI_A0_VECTOR))) #endif void USCI_A0_ISR(void) { switch(__even_in_range(UCA0IV,USCI_UART_UCTXCPTIFG)) { case USCI_NONE: break; case USCI_UART_UCRXIFG: RXData = EUSCI_A_UART_receiveData(EUSCI_A0_BASE); break; case USCI_UART_UCTXIFG: break; case USCI_UART_UCSTTIFG: break; case USCI_UART_UCTXCPTIFG: break; } }
**Attention** This is a public forum