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.
I am changing the Modbus baud rate on my MSP430f5310 part from 4800 to 19200 and am seeing some higher than expected TX errors - about 9.5% when the max TX Error from timer setup is expected to be 4.6%, shown in Table 36-5 below.
Could this be a limitation of the part? What can I do to overcome this high error rate? Are there measurements I can take to more accurately diagnose my issue?
Auxillary information: I was successfully able to set up the part with 4800 baud without any send or receive errors. I am working in a relatively noise-free environment. I am compiling C code using Code Composer Studio. The highlighted areas represent the changes I made to increase the baud rate.
Please Advise.
From the table above, total error of a setting is going to be the addition of the absolute value of both the negative and positive side. So total possible error for your settings on Tx side is closer to 7.8% and 9.7% on the Rx side. This is assuming no error introduced from your clock source as well (unlikely).
If you still want to use the same BRCLK and baud rate combination, but want to lower error, then I would turn the oversampling off and adjust the over settings to what is in Table 36-4 as shown below. Alternatively, you can adjust BRCLK Frequency to a higher value to reduce error as well.
Thanks for your response. I would like to avoid changing the BRCLK frequency as there are other communication protocols that are dependant on it. Therefore I tried turning oversampling off and changed the other values according to the table.
I am still seeing a 6.7% error rate on messages, taken from a sample of 130,000 messages. Is there anything else I can do to reduce the error rate?
Here is a snippet of the setup:
UCA0BRW = 54; UCA0MCTL = UCBRS_5 + UCBRF_0;
I am using TA0, setup below:
//Program Timer 0 capture 0 to capture on rising and falling edges // SMCLK /8 up to 0xffff Timer clear TAIFG interrupt DISABLE TA0CTL = 0x200 | 0xc0 | 0x20 | 0x4 | 0x0; //0x0E24 // Cap rising+falling + Input A Sync+ Cap Interrupt Enabled TA0CCTL0 = 0xc000 | 0x900 | 0x10;
Ian,
I am confused on how you are using a timer to clock the USCI module. The only clocks available to be used for th eUSCI module are ACLK, SMALCK, or an external clock fed into the USCI module using a UCAxCLK pin. you choice should be reflected within the UCAxCTL1 Register and the UCSSELx bits. Which clock are you feeding into the USCI? ALCK/SMCLK/External? and what source is driving that clock?
Sorry, I was looking in the wrong place. It is based on SMCLK
P3SEL |= BIT3 | BIT4; // P3.3,4 = USCI_A0 TXD/RXD UCA0CTL1 |= UCSWRST; // A0 CTRL register is reset **Put UART state machine in reset** UCA0CTL1 |= UCSSEL__SMCLK; // A0 SMCLK (clock source 2)
**Attention** This is a public forum