Re: how to initializatize/re-configure usart?



On Fri, 28 Sep 2007 22:14:15 -0500, Jack Klein <jackklein@xxxxxxxxxxx>
wrote:

On Fri, 28 Sep 2007 06:44:14 -0500, "bcincin" <berkecincin@xxxxxxxxx>
wrote in comp.arch.embedded:


Hi. I want to change reset uart and change baud rate with an interface
(combobox) on windows. At the beginning default baud rate is 2400.

For what UART? What hardware is this program for?

ME2 |= UTXE1 + URXE1; // Enable USART1 TXD/RXD

UCTL1 |= CHAR; // 8-bit character
UTCTL1 |= SSEL0; // UCLK = ACLK
UBR01 = 0x0D; // 32k/2400 - 13.65
UBR11 = 0x00;
UMCTL1 = 0x6B; // Modulation
UCTL1 &= ~SWRST; // Initialize USART state machine
IE2 |= URXIE1; // Enable USART1 RX interrupt

..

how can i reset this later? I tried something like this but it doesn't
work

...
case 3: // set baud rate 9600
UCTL1 |= CHAR; // 8-bit character
UTCTL1 |= SSEL0; // UCLK = ACLK
UBR01=0x03;
UBR11=0x00;
UMCTL1=0x29;
UCTL1 &= ~SWRST;
IE2 |= URXIE1;
default;
....

Without knowing what part you are talking about, it's hard to do more
than guess. But perhaps you should at least disable the interrupt
while you are changing settings.

Also ... many UARTS have a soft-reset per channel. You can use this
bit to reset the specific channel, and then reconfigure.

Regards
Anton Erasmus
.



Relevant Pages

  • Re: shift reg 32bits
    ... always @ (posedge clk, posedge reset) ... Unless your UART has a FIFO, ... //reset all signals ...
    (comp.lang.verilog)
  • Re: H8/3867 Synchronous Uart False Clocks...
    ... An attempt to reset the uart, ... Why do I need to reset the receiver? ... >>I have tried toggling the RE bit, ...
    (comp.arch.embedded)
  • Re: SCC2692 UART
    ... over the line it seems (testing it with a connection to a pc with ... If the chip select for the UART is done with programmable logic, ... will need the scope or analyzer to verify that it actually pulses when ... How do you know this is the correct value to set the baud rate you ...
    (comp.arch.embedded)
  • H8/3867 Synchronous Uart False Clocks...
    ... Does anybody know how to reset an H8 /3867 synchronous ... uart when it is part way through receiving a data byte? ... I have tried toggling the RE bit, ... the uart clocks in the first bit. ...
    (comp.arch.embedded)
  • Re: AT91RM900 USART problem
    ... with the UART when running the USART 1.5% slower than the selected ... baud rate divisor is set to 33. ... USART to 8N and send it 7N data we should get framing errors but we ...
    (comp.arch.embedded)