Quantcast
Channel: MSP low-power microcontroller forum - Recent Threads
Viewing all articles
Browse latest Browse all 21949

CCS/MSP430FR4133: MSP430FR4133 - CodeComposer Studui and the TXD - UCTXIFG Flag

$
0
0

Part Number:MSP430FR4133

Tool/software: Code Composer Studio

Dear Ladies and Gentleman!

I use a MSP430FR4133 Microprozessor. This Microprozessor has TXD and RXD for using a UART.

I use the code example for this Microporzessor:

(the code example is from the internet: // Darren Lu // Texas Instruments Inc. // June 2014 // Built with IAR Embedded Workbench v6.10 & Code Composer Studio v6.0

In the Interrupt routine of this Microprozessor Stands:

#if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)

#pragma vector=USCI_A0_VECTOR __interrupt void USCI_A0_ISR(void)

#elif defined(__GNUC__) void __attribute__ ((interrupt(USCI_A0_VECTOR))) USCI_A0_ISR (void)

#else #error Compiler not supported!

#endif { switch(__even_in_range(UCA0IV,USCI_UART_UCTXCPTIFG)) {

case USCI_NONE:

break;

case USCI_UART_UCRXIFG:

while(!(UCA0IFG&UCTXIFG));

// ===== here is the important BIT: UCTXIFG - if this is set

// another Character can be sent!!

UCA0TXBUF = UCA0RXBUF;

__no_operation();

break;

case USCI_UART_UCTXIFG:

break;

case USCI_UART_UCSTTIFG:

break;

case USCI_UART_UCTXCPTIFG:

break;

default: break;

} }

This Code write Bytes to the TXD - and with the oszilloskope I can see the signal.

I use the CCS V6.xx for debugging.

Sometimes the debugger stands at the while(! xxxxxx) still (green marked code).

The register value for UCTXIFG is not correct at this moment.

But this is not logical, because if I use this code at other programm points, it works well.

Can you please give me further information, about the TXD - UCTXIFG Flag when this bit is set, or when this bit is not set?

If have problems during debugging this code!!

If I change the code to === while((UCA0IFG&UCTXIFG) === the program works.

But Darren Lu write the code as ==== while (! xxxx) ==== !!!!!!!!

Please write me an email, with further information about that.

with best regards

Binder


Viewing all articles
Browse latest Browse all 21949

Trending Articles