Using Internal crystal oscillator in lpc845

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using Internal crystal oscillator in lpc845

1,575 Views
angiey0017
Contributor III

Hi,

I'm using LPCXpresso845MAX [OM13097]development board, and developed the application to the

requirement needed in the development board, so same we designed a prototype board for further process,

the issue is the frequencies generated in different prototype board, i..e., whatever the PWM frequency

generated in the development board same is loaded to the prototype boards so there is difference

of frequencies with 0.01hz in some board,0.02 in some board.

When I test the 14.40hz[CONSTANT FREQUENCY] in dev board I get 14.40hz ,
but below are the frequencies getting when programmed the same code in
prototype board..
PROTO 1: 14.40 [MODE]----> 14.40HZ
PROTO 2 :14.40[MODE]------> 14.42HZ
PROTO 3 :14.40[MODE]------> 14.39HZ//and sometimes 14.41
PROTO 4 :14.40[MODE]------> 14.40HZ
Not using external crystal oscillator in the prototype board, but internal code setting is of the XTAL is 12Mhz,
is there anything to be change or called for the internal crystal oscillator in the code, since in the code called the
below function BOARD_BootClockFRO30M();[function which is used for PLL].
So is there any other internal function or library to be added for the internal crystal oscillator?
Thank you
Labels (1)
6 Replies

1,311 Views
angiey0017
Contributor III

Hi,

 

Please respond to the case id mentioned below

Case Id is as below

Case:00236868:WILL MCU AS A TOLERANCE? HAVE A DIFFERENT ISSUE AS DESCRIBED

BELOW

 

Thank you

0 Kudos

1,311 Views
Sabina_Bruce
NXP Employee
NXP Employee

Hello,

As stated previously the support will continue on the internal thread, it is not necessary to post a reminder as the emails are received. 

Thanks in advance!

1,311 Views
Sabina_Bruce
NXP Employee
NXP Employee

Hello,

I'd recommend taking a look at Section 8.3 of the reference manual as it describes the configuration options for the clocks. In addition you can also use the exaple provided in the demos of the SDK to view power_mode_switch_lpc. in this case you will see the different APIs used to configure what is stated in section 8.3.

If you are creating your own code you can add the clock drivers manually to your project by doing the following:

1. Select your project and right click.

2. Select SDK Management and Manage SDK Components

3. Select the drivers tab and make sure that clock is selected.

pastedImage_1.png

In the case of the example I described, they use BOARD_BootClockPll24M(); From here you could divide the clock by 2 to achieve the 12M.

Let me know if you have further questions.

Best Regards,

Sabina

0 Kudos

1,311 Views
vidhya1
Contributor III

Hi Sabina,

Thanks for the reply.

I'm using keil uvision IDE for the project.

I tried using 24Mhz as you suggested, but till the issue persists..

We are trying to use external crystal clock of 12cMhz, so do we need to initialise the xtal1 and xtal2 pins?

referred user manual, and tried activating the crystals, but the external crystal of 12Mhz connected to the

prototype board is not working, is there any registers need to be set ?

Thank you

0 Kudos

1,311 Views
Sabina_Bruce
NXP Employee
NXP Employee

Hello,

In order to used the external oscillators, you need to configure it as so:

pastedImage_1.png

In the reference manual the links are provided for each register that are mentioned in the list above. The one called "pin enable register 0", is the switch matrix block, you will find the bits for XTALIN and XTALOUT to be 7 & 8. 

Please let me know if you have further questions.

Best Regards,

Sabina

0 Kudos

1,311 Views
vidhya1
Contributor III

Hi,

Regarding this issue I had created a case, please respond to that case,

awaiting for your response.

Case Id is as below

Case:00236868:WILL MCU AS A TOLERANCE? HAVE A DIFFERENT ISSUE AS DESCIBED

BELOW

Thank you

0 Kudos