Hello:
I am trying to transmit and receive at different baud rates to different devices using the same UART for msp430f2272.
I have a transmitter circuit transmitting at a baud rate of 9600 from MSP1 to MSP2, when MSP2 receive data from MSP1 I want to transmit to another device at a different baud rate.
In the code for MSP2 (receiver circuit) , I am waiting inside the main method for the Rx Interrupt to fire. Once I go to the Rx Interrupt subroutine which means I received data correctly from MSP1, then I want to transmit to the other device with different baud rate. So in order to do this I configure the UART again with different baud rate and transmit, but I want to make sure that if my Rx Interrupt gets fired again I should recognize it and transmit accordingly.
My idea is to have this while loop inside the main method for MSP2
while (!(IFG1 & UCA0RXIFG)) // waiting to receive a new character at a baud rate of 9600 from MSP1
{ //meanwhile Transmit at 4800 baud rate to another device
uart_device_confi // configure at baud rate of 4800
tx_a(); //transmit at 4800 baud rate
uart_config(); // check with baud rate 9600 if RX is ready?
}
Is this the correct approach to transmit and receive at different baud rates using the same UART peripheral?
Thank you
Berny