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
Reply by Christian Klippel●September 18, 20072007-09-18
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
Reply by paramesh murthy●September 18, 20072007-09-18
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.
Reply by Christian Klippel●September 18, 20072007-09-18
hello again,
stupid me, used 30 mhz instead of 20.
so, you calculation is right, mine is wrong.
sorry for the fuzz...
greets,
chris
Reply by Brendan Murphy●September 15, 20072007-09-15
--- In l..., "jdauchot" wrote: >
> Hi All
>
> I still have a problem to resolve "__udivsi3"
>
> I use Eclipse and GNU tool chain
>
> Regards
> Jean-Jacques
Did you search the forum for "udivsi3" as I suggested?
Reply by jdauchot●September 15, 20072007-09-15
Hi All
I still have a problem to resolve "__udivsi3"
I use Eclipse and GNU tool chain
Regards
Jean-Jacques
--- In l..., "C RP" wrote: >
> Hi Jean,
>
> Sorry, forgot to mention that. Yes, the error "__udivsi3" got debugged > .
> Under the Linker Options , uncheck the option "Donot use Standard System > Libraries".
>
> But, iam still unable to debug the warnings.
>
> Cheers,
> Chetan
>
> On 9/13/07, Brendan Murphy wrote:
> >
> > --- In l...
40yahoogroups.com>, "jdauchot" > > wrote:
> > >
> > > Ok
> > >
> > > But did you find out about the problem with the linker undefined
> > > reference '__udivsi3' as I have the same problem
> > >
> > > Regards
> > >
> > > Jean-Jacques
> > >
> >
> > Try searching the forum for "udivsi3" and you should get some answers. > >
> > Brendan
> >
> >
> >
>
>
Reply by C RP●September 14, 20072007-09-14
Hi Jean,
Sorry, forgot to mention that. Yes, the error "__udivsi3" got debugged
.
Under the Linker Options , uncheck the option "Donot use Standard System
Libraries".
But, iam still unable to debug the warnings.
Cheers,
Chetan
On 9/13/07, Brendan Murphy wrote: >
> --- In l... , "jdauchot"
> wrote:
> >
> > Ok
> >
> > But did you find out about the problem with the linker undefined
> > reference '__udivsi3' as I have the same problem
> >
> > Regards
> >
> > Jean-Jacques
> > Try searching the forum for "udivsi3" and you should get some answers.
>
> Brendan
>
>
>
Reply by Brendan Murphy●September 13, 20072007-09-13
--- In l..., "jdauchot" wrote: >
> Ok
>
> But did you find out about the problem with the linker undefined
> reference '__udivsi3' as I have the same problem
>
> Regards
>
> Jean-Jacques
>
Try searching the forum for "udivsi3" and you should get some answers.
Brendan
Reply by jdauchot●September 13, 20072007-09-13
Ok
But did you find out about the problem with the linker undefined
reference '__udivsi3' as I have the same problem
Regards
Jean-Jacques
--- In l..., "C RP" wrote: >
> Dear Jean-Jacques,
>
> Yes you are correct. Thank You.
> I have set right the baud rate in the startup file.
> Now it's working fine.
>
> Regards,
> Chetan
>
> On 9/13/07, jdauchot wrote:
> >
> > Looks like the baud rate is set wrong on the LPC CPU
> >
> > Regards
> >
> > Jean-Jacques
> >
> >
> > --- In l... , chetanrp@ > > wrote:
> > >
> > > Hi,
> > > Also, I would like to add the following observations
> > >
> > > Iam not using printf. Iam using the following routine to print the > > output on the PC's hyperterminal.
> > > Iam seeing some junk values appear on the hyperterminal.
> > >
> > > Print_4bits_to_Screen( (Temp_Data_Output[i] & 0x000000F0)>>4 );
> > >
> > >
> > > UInt32 Print_4bits_to_Screen( UInt32 Value_Hex_4bits)
> > > {
> > > switch(Value_Hex_4bits)
> > > {
> > > case 0:
> > > case 1:
> > > case 2:
> > > case 3:
> > > case 4:
> > > case 5:
> > > case 6:
> > > case 7:
> > > case 8:
> > > case 9: U0THR = Value_Hex_4bits + 48; // print "0 - 9"
> > > break;
> > > case 10:
> > > case 11:
> > > case 12:
> > > case 13:
> > > case 14:
> > > case 15: U0THR = Value_Hex_4bits + 55; // print "A - F"
> > > break;
> > >
> > > case 32:
> > > case 44:
> > > case 45: U0THR = Value_Hex_4bits;
> > > break;
> > > default:
> > > break;
> > > }
> > > while( (U0LSR & 0x20) == 0 );
> > > return(0);
> > > }
> > >
> > > So, please I would like to know whether this program is wrong.
> > > Is it that one has to use putchar function for GNU compiler.
> > >
> > > Regards,
> > > Chetan
> > >
> > >
> > >
> > > Hi there,
> > > >Iam using Keil uVision3(MDK 3.11) with GNU compiler for my LPC2368 > > based project.
> > > >
> > > >Iam seeing the following error (undefined reference
> > to '__udivsi3') and warnings( missing braces around initializer)
:
> > > >Build target 'MCB2300'
> > > >assembling Startup.s...
> > > >compiling LPC2000_CAN_Driver.c...
> > > >src/LPC2000_CAN_Driver.c(72): warning: missing braces around
> > initializer
> > > >src/LPC2000_CAN_Driver.c(72): warning: (near initialization
> > for 'CAN_Send_Data[0].DataField')
> > > >compiling target.c...
> > > >compiling irq.c...
> > > >compiling LPC2000_CAN_SYS.c...
> > > >linking...
> > > >lpc2000_can_sys.o(.text+0x21c): In function 'uart0_config':
> > > >src/LPC2000_CAN_SYS.c(225): error: undefined reference
> > to '__udivsi3'
> > > >collect2: ld returned 1 exit status
> > > >Target not created
> > > >
> > > >The error message points to the code line
> > > >"temp_uart0 = (Fpclk/16)/Baudrate; " in the following source code : > > > >
> > > >void uart0_config(UInt32 Baudrate,UART0MODE U0_config)
> > > >{
> > > > UInt32 temp_uart0;
> > > > U0LCR = 0x80; // DLAB=1, Can use U0DLM, U0DLL
> > > > temp_uart0 = (Fpclk/16)/Baudrate;
> > > >
> > > > U0DLM = temp_uart0> > 8;
> > > > U0DLL = temp_uart0&0xFF;
> > > >
> > > > temp_uart0 = U0_config.Datalength - 5;
> > > > if( U0_config.Stopbit == 2 ) temp_uart0 |= 0x04;
> > > >
> > > > if( U0_config.Paritybit != 0 )
> > > > {
> > > > U0_config.Paritybit = U0_config.Paritybit - 1;
> > > > temp_uart0 |= 0x08;
> > > > }
> > > > temp_uart0 |= U0_config.Paritybit <
> > >
> >
> >
> >
>
>