Support for LPC1114FD/102

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Support for LPC1114FD/102

2,641件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cwpjr on Tue May 28 19:45:47 MST 2013
I have working code for LPC1114/301 running on the NXP OM11049 board.
The project is from example code with CMSIS, the UART one.

I have working custom hardware utilizing the LPC1114FD/102, and so set the project with MCU set to my hardware, with memory use adjusted from 8k to 4k.
The project writes to flash fine.

The project hangs waiting for PLL's to stabilize.

I assumed CMSIS and the project MCU settings would do the same, or at least correct initialization of any 1114.

The CMSIS example code is from the release CodeRed I'm using:

Version: LPCXpresso v5.1.2 [Build 2065] [2013-02-20]
0 件の賞賛
返信
17 返答(返信)

2,594件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cwpjr on Thu May 30 13:41:06 MST 2013
You guys ask ME if I've read what you posted?!?

As stated I have loaded code that ran on my HW, both in ISP and SWD.

Since I enabled the IRC clock in CMSIS I end up in the boot rom no matter what I load.
So
I used The Flash Utility, Erased Flash, Downloaded a non CMSIS version of my project and it's running just fine. :p
0 件の賞賛
返信

2,594件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Thu May 30 12:51:52 MST 2013

Quote: cwpjr
I changed this to zero to select the IRC clock and now I get No source available for "0x1fff0f60"



That's BOOT ROM, probably you are in ISP already. So just flash a working program (blinky or something like that).
0 件の賞賛
返信

2,594件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cwpjr on Thu May 30 12:42:11 MST 2013
From CMSIS doc:
//     <o6> Select Input Clock for sys_pllclkin (Register: SYSPLLCLKSEL)
//                     <0=> IRC Oscillator
//                     <1=> System Oscillator
//                     <2=> WDT Oscillator
//                     <3=> Invalid

I changed this to zero to select the IRC clock and now I get No source available for "0x1fff0f60"

Since IRC and System Clock are both default to 12mhz clocks what else must be changed?

Board appears brick'd because it will not load and run code that ran on it before this.

ISP nor SWD not recovering. I've tried every variation except vector caching which is not enabled for this chip.

What other options are there?
0 件の賞賛
返信

2,594件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by serge on Thu May 30 00:29:10 MST 2013
CMSIS has been modified for the LPCXPRESSO boards who have all an external crystal. :p
So if you design a board without a crystal you MUST :eek: change CMSIS to use the IRC!! Even if you design a board with an external crystal but with another frequency you have to change CMSIS!
Never asume anything! :eek:

Anyway have you actualy read any of the answers CodeRed and R2D2 gave you?
Have you read the user manual?
0 件の賞賛
返信

2,594件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed May 29 18:04:41 MST 2013
Please read User manual UM10398 LPC111x/LPC11Cxx.

Without understand registers you'll not understand what's happening.


Quote:

3.5.9 System PLL clock source select register
This register selects the clock source for the system PLL. The SYSPLLCLKUEN register
(see Section 3.5.10) must be toggled from LOW to HIGH for the update to take effect.
Remark: When switching clock sources, both clocks must be running before the clock
source is updated.
...
Table 16. System PLL clock source select register (SYSPLLCLKSEL, address 0x4004 8040)
bit description
Bit Symbol Value Description Reset value
[B][COLOR=Red]1:0 SEL System PLL clock source[/COLOR][/B]
[COLOR=Red]0x0 IRC oscillator[/COLOR]
0x1 System oscillator
0x2 Reserved
0x3 Reserved

So without system oscillator you have to choose IRC ([COLOR=Red]with less accuracy[/COLOR]) .
0 件の賞賛
返信

2,594件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cwpjr on Wed May 29 17:43:06 MST 2013
The info is welcome. So why was the values changed?

Changing the MCU to another chip in the same family?

Why would it make that assumption?
0 件の賞賛
返信

2,594件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed May 29 17:39:34 MST 2013
And this sample is using an old CMSIS copy in project folder. And it's system_init of system_LPC11xx.c is using:

#define SYSPLLCLKSEL_Val      0x00000001
Right?

So this is an external crystal setup. Either you add a crystal or change you setup.
[B][SIZE=6][COLOR=Red]Without changes this sample is not working without external crystal.[/COLOR][/SIZE][/B]
0 件の賞賛
返信

2,594件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cwpjr on Wed May 29 17:23:32 MST 2013
The NXP uat code in the NXP_INSTALL_DIR
E:\CodeRedLPCexpresso\LPCXpresso_5.1.2_2065\lpcxpresso\Examples\NXP\LPC1000\LPC11xx from the NXP_LPCXpresso1114-301_2011-01-27.zip

This is a CMSIS project that takes care of clocks / pll etc. for a project, which usually stops at main().

I have never specified clocks etc for my NXP 1114 board. And my board is virtually the same.
0 件の賞賛
返信

2,594件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed May 29 16:14:38 MST 2013

Quote: cwpjr
I'm flashing the stock uart example code for the NXP 1114/301 board.



Which example is it? I don't know UART samples which don't use crystals.

Which PLL clock source is selected there?


Quote: cwpjr
I changed nothing accept the MCU setting to LPC1114FD/102

I have never specified anything else, clock, pll etc.



That's your problem. You have no clue about your PLL settings and probably the code you have copied is using an external crystal.
0 件の賞賛
返信

2,594件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cwpjr on Wed May 29 15:59:59 MST 2013
I'm flashing the stock uart example code for the NXP 1114/301 board.

That board and my board have no external crystals.

My board uses LPC1114FD/102 - a 32kflash 4k ram 1114.

I changed nothing accept the MCU setting to LPC1114FD/102

I have never specified anything else, clock, pll etc.
0 件の賞賛
返信

2,594件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed May 29 15:42:24 MST 2013

Quote: cwpjr
This is not my code. Completely UART example code as stated.
The value was seen in a hover over of the assignment value in NXP code.
So is CMSIS broke?



:confused:

I'm confused. Which code are you flashing in your board (without crystal)?

Which PLL settings do you use there?

Have you done anything to change settings to use another clock source?
0 件の賞賛
返信

2,594件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cwpjr on Wed May 29 15:32:41 MST 2013
This is not my code. Completely UART example code as stated.
The value was seen in a hover over of the assignment value in NXP code.
So is CMSIS broke?
0 件の賞賛
返信

2,594件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed May 29 14:48:45 MST 2013

Quote: cwpjr
In uart example code (untouched), In the function 'void SystemInit (void)' from the file "system_LPC11xx.c":

About 6 lines prior to the hang the value you ask about says 1 according to hovering over the assignment argument:
  Line 313: LPC_SYSCON->SYSPLLCLKSEL  = SYSPLLCLKSEL_Val;   /* Select PLL Input         */

This in the uart example code that ran on the OM11049 LPC1114 board.

I changed MCU to LPC1114FD/102. The uart code downloads and runs startup
then  hangs in "system_LPC11xx.c" in the function 'void SystemInit (void)' at this line:
Line 321: while (!(LPC_SYSCON->SYSPLLSTAT & 0x01));          /* Wait Until PLL Locked    */


Are you kidding or aren't you aware that  SYSPLLCLKSEL = 1 is your crystal which in your case is a 'virtual crystal'?
0 件の賞賛
返信

2,594件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cwpjr on Wed May 29 14:08:25 MST 2013
In uart example code (untouched), In the function 'void SystemInit (void)' from the file "system_LPC11xx.c":

About 6 lines prior to the hang the value you ask about says 1 according to hovering over the assignment argument:
  Line 313: LPC_SYSCON->SYSPLLCLKSEL  = SYSPLLCLKSEL_Val;   /* Select PLL Input         */

This in the uart example code that ran on the OM11049 LPC1114 board.

I changed MCU to LPC1114FD/102. The uart code downloads and runs startup
then  hangs in "system_LPC11xx.c" in the function 'void SystemInit (void)' at this line:
Line 321: while (!(LPC_SYSCON->SYSPLLSTAT & 0x01));          /* Wait Until PLL Locked    */
0 件の賞賛
返信

2,594件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed May 29 11:04:10 MST 2013

Quote: cwpjr
It hangs in a while statement commented as waiting for PLL's to stabilize.



:confused:

And your SYSPLLCLKSEL is what?
0 件の賞賛
返信

2,594件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cwpjr on Wed May 29 10:47:09 MST 2013
No external xtals on my board.

The code downloads thru SWD, which  assumes 12mhz like NXP board. It never reaches breakpoint at main().

It hangs in a while statement commented as waiting for PLL's to stabilize.

On my board I also load and runs a non cmsis project to main(), but where the uart functionality works on the NXP board it is not here.

I thought within th LPC11xx the SOC stuff was all the same, and if not th CMSIS example stuff would still work

I would have thought a cmsis project for one 1114 would work same as board, or any other 1114 in it's class, which in this case is LPC11xx..

Is there only one cmsis for all 1114 chips, with only version levels? Or are there cmsis's for subsets of the 1114's?
0 件の賞賛
返信

2,594件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed May 29 00:54:20 MST 2013
Does the clock crystal you have on your board match the one of the LPCXPresso board? Might be worth modifying the CMSIS code to use the IRC instead.

Regards,
CodeRedSupport
0 件の賞賛
返信