Discussion in "ARM Development" started by    shyam    Dec 29, 2007.
Sat Dec 29 2007, 02:53 am
#1
please post your doubts here
Sat Dec 29 2007, 11:20 am
#2
I am getting the feeling of being trained by an online course . It was right decision on the part of Shyam to elaborate on PLL as it is foremost parameter to be be properly initialised prior to any operation further . I am going through it and by evening i will post my doubts.
Sat Dec 29 2007, 01:18 pm
#3
Shyam is a very good tutor thank you.. for the tutorial..
Sat Dec 29 2007, 01:47 pm
#4
i have a doubt..

in calculation of U0DLM and U0DLL the formula u gave

BAUDRATE = PCLK /( (16*(256*U0DLM+U0DLL)) (1+ (DivAddVal/MulVal)) )



assuming PCLK = 60Mhz assuming no fine tuning required...
for a baud rate of 115200 lets find out the values of DLL and DLM remember it will be easier if ou consider DLL and DLM a single 16 bit register instead of 2 8 bit register .. with the higher byte going to DLM

=> (256*U0DLM+U0DLL) = 60,000,000/(16*115200) = 32.552 =>0x0020 hex
=> DLM = 0x00
DLL = 0x20



where does DivAddVal and MulVal goes?

or DivAddVal is taken as 0?

now regarding PLL...
also lets say if i have 12Mhz crystal on board..
so multiplier should be 5 for 60Mhz max frequency
and divider let say 2 so FCC0 is 240Mhz which is in between specified limit..

so my PLL defines should look like this..
#define FOSC            12000000            
 /*on board crystall frequency */
#define PLL_M           5                           
#define MSEL            (PLL_M-1) 
#define PSEL0           5      
#define PSEL1           6  
#define PLLE            0
#define PLLC            1    
#define PLOCK           10  
#define PLL_FEED1       0xAA  
#define PLL_FEED2       0x55                


Now what if i have 60Mhz onboard frequency.. i am not sure if thats possible to have..
so multiplier is 1 and divider is 2..
so
#define MSEL            (PLL_M-1)
/* MSEL = 0 will this be a problem? or is ok? */ 
Sat Dec 29 2007, 07:33 pm
#5
@ ajay doubt 1

where does DivAddVal and MulVal goes


yeah u guessed right DivAddVal =0 (default)
@ ajay doubt 2

Now what if i have 60Mhz onboard frequency..



microcontroller’s onboard oscillator circuit supports external crystals in the range of 1 MHz
to 30 MHz only. If the on-chip PLL system or the boot-loader is used, the input clock
frequency is limited to an exclusive range of 10 MHz to 25 MHz.


so 60 MHz out of question...

 ajay_bhargav like this.
Sat Dec 29 2007, 11:59 pm
#6
:blush
yeah, was a wrong kind of question to ask about frequency..
so my calculations are correct according to 12Mhz crystal?
Sun Dec 30 2007, 12:09 am
#7

M = CCLK / FOSC. M must be in
the range of 1 to 32



so yes your calculations are correct...
Sun Dec 30 2007, 10:06 am
#8
This describes PLL issues deeper
http://www.standardics.nxp.com/support/documents/microcontrollers/pdf/an10331.pdf
Sun Dec 30 2007, 01:08 pm
#9
well i already mentioned two books....
lpc214x user manual and the LPCbooksrn nothing on philips site better than that
Wed Mar 31 2010, 05:35 am
#10
Do you need to anything different when configuring UART1?
I have UART0 working fine, but using the same code for UART1 I get garbage 60% of the time.

Also wondering about DivAddVal and MulVal, it doesn't say anything about them in the lpc2106 UM , and there not In the lp2000.h file that I have, as a consequence Ive had to use a baud of 2400, basically the highest even number I could derive from my setup, i.e. 16MHz crystal.

Thanks,
V

Edit: It appears I spoke too soon regarding UART0 working, for some reason I can only send a string/char from my MCU to PC after I have received a char.

Sometimes I will get garbage for that "first" string but generally I get nothing, once something is received once, then everything operates fine.


[ Edited Wed Mar 31 2010, 06:27 am ]

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

KevinTab
Sun Apr 28 2024, 05:35 am
Tumergix
Sun Apr 28 2024, 12:59 am
StevenDrulk
Sat Apr 27 2024, 08:47 pm
StephenHauct
Sat Apr 27 2024, 09:38 am
Adamsaf
Sat Apr 27 2024, 07:12 am
Robertphype
Sat Apr 27 2024, 12:23 am
ktaletrryp
Fri Apr 26 2024, 10:55 pm
Robertrip
Fri Apr 26 2024, 11:20 am