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
已解决! 转到解答。
Hello,
I recommend to use at first the examples, then if you need more information let me know.
Best regards,
Pavel
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!
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
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
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
Hello,
I recommend to use at first the examples, then if you need more information let me know.
Best regards,
Pavel