How to modify system initialization (LPCOpen project)

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

How to modify system initialization (LPCOpen project)

ソリューションへジャンプ
1,898件の閲覧回数
Eugene723
Contributor II

I'm learning MCUXpresso, so I created "LPCOpen - C project" for LPC1788 MCU, no board.

In "cr_startup_lpc177x_8x.c" source file "ResetISR" calls "SystemInit", which after several more invocations ends up calling "Chip_SetupIrcClocking" located in "sysinit_17xx_40xx.c" source file wherein internal oscillator IRC is setup. This all happens before "main" is called.

 

How do I change this setup, for example switch to external oscillator? Do I change "sysinit_17xx_40xx.c" source file (downloaded with LPCOpen 2.10 devkit) directly or shall I write my own clock configuration routine and call it from "main"?

Note that this is NOT a question regarding which registers need which values.

Understandably, "Clocks" perspective doesn't work since my project is not based on MCUXpresso SDK.

 

Please advise.

 

Thank you,

Eugene

タグ(2)
0 件の賞賛
返信
1 解決策
1,862件の閲覧回数
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello,

I recommend to use at first the examples, then if you need more information let me know.

  1. use the 3rd option. Pavel_Hernandez_0-1662764434855.png

     

  2. then find the LPCOpen project at this direction, C:\nxp\MCUXpressoIDE_11.6.0_8187\ide\Examples\LPCOpen.
  3. Select the MCU. Pavel_Hernandez_1-1662764579991.png

     

  4. Click next and select the example.Pavel_Hernandez_2-1662764617891.png

     

Best regards,
Pavel

元の投稿で解決策を見る

0 件の賞賛
返信
5 返答(返信)
1,820件の閲覧回数
Feiy
Contributor I

Hi Pavel,

  Thank you very much for replying my question, I already figure out how to add library path for releases. I created another  two new cases 1. I need secondary boot loader c code for lpc11u24 . 2. Could I convert keil project to lpcopen? since I use keil software development tool for long time, now I want switch it to lPCXpressor. Thank you again!

0 件の賞賛
返信
1,811件の閲覧回数
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello,

I have your case too, for the secondary bootloader, let me get more information today, and about the Keil to LPCOpen let me do a review but I do not warranty anything. And you want to use LPCxpresso or MCUXpresso?

Best regards,
Pavel

0 件の賞賛
返信
1,882件の閲覧回数
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello,

In order to get more details or what are trying to do,  Could you tell me what example are you trying to set up?

If you want to set up the external crystal you could use the sysinit_17xx_40xx.h to use the function to enable the external crystal [Chip_Clock_EnableCrystal].

Best regards,
Pavel

0 件の賞賛
返信
1,871件の閲覧回数
Eugene723
Contributor II

Hi Pavel,

Thanks for the reply. My goal eventually is to port source code developed for our proprietary board into MCUXpresso toolchain.

I'm not using any example: on newly installed MCUXpresso, I picked "New Project" from Quickstart Panel, then selected LPC1788 and no board. Step-by-step wizard generated two projects: "lpc_chip_177x_8x" that compiles into library and my test project where "main" function resides.

Following your suggestion, I found function “Chip_SetupXtalClocking” that isn’t called from anywhere in the generated code. I can invoke it from “Chip_SystemInit” found in “sysinit_17xx_40xx.c” instead of “Chip_SetupIrcClocking”. But my question is – since “sysinit_17xx_40xx.c” was supplied as part of LPCOpen chip library – is it OK to edit this code file?

Eugene

0 件の賞賛
返信
1,863件の閲覧回数
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello,

I recommend to use at first the examples, then if you need more information let me know.

  1. use the 3rd option. Pavel_Hernandez_0-1662764434855.png

     

  2. then find the LPCOpen project at this direction, C:\nxp\MCUXpressoIDE_11.6.0_8187\ide\Examples\LPCOpen.
  3. Select the MCU. Pavel_Hernandez_1-1662764579991.png

     

  4. Click next and select the example.Pavel_Hernandez_2-1662764617891.png

     

Best regards,
Pavel

0 件の賞賛
返信