EmbeddedRelated.com
Forums

GNU compiler ERROR/Warnings

Started by chet...@gmail.com September 13, 2007
Hi,
Am working on the lpc arm2888 processor. i tried sending data through the uart port to the hyperterminal. got some garbage value. what may be the cause for it.
I had set the clock generation unit to 60MHz and in clock generation unit itself i had set the divider to 1/3, uartfdcr=0x007fe015; (Is this correct? means, will it divide by 3)
so that the output is 20 mhz.
later i had set the baud rate in baud rate generator as follows:

FCR= 0x0007;
// Set DLAB and word length set to 8bits
LCR= 0x0083;
// Baud rate set to 9600
DLL=0x5D;
DLM=0x00;
FDR=0x52;

// Clear DLAB
LCR=0x0003;

the data has been sent to THR-transmit hold register as shown below.
can anyone guide me where has the procedure gone wrong.

---------------------------------
Get the freedom to save as many mails as you wish. Click here to know how.

An Engineer's Guide to the LPC2100 Series

hello,

Am Dienstag, 18. September 2007 12:37 schrieb paramesh murthy:
[...snip...]
>
> FCR= 0x0007;
> // Set DLAB and word length set to 8bits
> LCR= 0x0083;
> // Baud rate set to 9600
> DLL=0x5D;
> DLM=0x00;
> FDR=0x52;
>
> // Clear DLAB
> LCR=0x0003;
>

if my calculations are right, then the above will result in 14400 baud.

19200 (19188 exactly) would be with dlm=1, dllA, mulval=7, divaddvqal=5

9600 (9615 exactly) would be dlm=2, dll=7, mulval=2, divaddval=8

again, of course only if i didnt made a stupid mistake with the
calculation....

greets,,
chris
Hi there,

Please check the clock value settings (PCLKSEL0_Val and PCLKSEL1_Val )
in the Startup.s file of your project.

Cheers,
Chetan
On 9/18/07, Christian Klippel wrote:
>
> hello again,
>
> stupid me, used 30 mhz instead of 20.
> so, you calculation is right, mine is wrong.
>
> sorry for the fuzz...
>
> greets,
>
> chris
>
> Yahoo! Groups Links
9600 DLM=0, DLLq, addval=3, mulval=8
10400 DLM=0, DLLR, ADDVAL, MULVAL
38400 DLM=0, DLL, ADDVAL=5, MULVAL=8
115200 DLM=0, DLL=5, ADDVAL=5, MULVAL=8