At 03:00 PM 10/10/04 +0000, you wrote:
>I started on a LPC2124 with 10MHz xtal, and none of the newlib-lpc
>examples picking up the right baud rate. (of course after adjusting
>SetNativeSpeed).
>
>Then I tried the UT040803A example, no luck on 10MHz. Then I throw in
>a 14.7456MHz xtal, and the UT040803A is working OK now. But the
>newlib-lpc examples still not picking up the right baud rate. This is
>how it's configured:
>
> SetNativeSpeed(14746uL);
> sp.baud = 115200uL;
> sp.length = UART_WORD_LEN_8;
> sp.parity = UART_PARITY_NONE;
> sp.stop = UART_STOP_BITS_1;
> SetMAM( 3u, MAM_full_enable);
> VPBControl(VPB_DIV1);
> SetDesiredSpeed(60000uL);
>
>Is there any obvious reason why this is not working? (lpc_hello_rs232
>from WinARM)?
This doesn't actually set the baud rate anywhere.
From the example test2.c
/* Set up serial port to desired rate. */
(void)ioctl( fileno(stdout), UART_SETUP, &sp);
Until the ioctl call is made nothing has set the baud rate.
Robert
" 'Freedom' has no meaning of itself. There are always restrictions,
be they legal, genetic, or physical. If you don't believe me, try to
chew a radio signal. "
Kelvin Throop, IIIMessage
Re: [lpc2000] Newlib-lpc exmaples and baud rate
2004-10-10 by Robert Adsett
Attachments
- No local attachments were found for this message.