631 views
in Getting started by
Hi,

I'm strugling to find a way to configure embedded wizard project for custom LPC54608 board, which is based on LPCXpresso546xx board ( I dont have 32.768kHz crytal on board, but otherwise it is similar, with SDRAM, FLASH, and different 480x800px LCD with touch controller). The problem I have is, I cant find where to set clock configuration to use my external 12MHz crystal. I also need to set some GPIO pins to certain logic levels to control LCD display mode of operation, get touch data and communicate with UART. What is the best way to do that? (without modifying generated code, which it is overwritten on every compile any way...)

I tried to load some example project, and it compiles and it seems that flash is programmed just fine, I just dont see anything happening on board (crystal not running...).

Is it possible to configure all above in embedded wizard IDE? or how to combine LPCXpresso project with the code from wizard IDE... ?

Thank you for any suggestion, this is my first time trying to use embedded wizard and I'm missing general overview on how should I approach firmware design for custom board with embedded wizard.

 

Best regards, Darko

1 Answer

0 votes
by

Hello Darko,

first of all, you do not have to change the automatically generated UI code. All code that is located in "Generated Code" is independent to the hardware. In your case you can use the same platform package as for the  LPC54608 Build Environment. The files to configure your custom hardware are located in the "Target Specific" folder and in your case in the sub folder "Drivers".

All files in "Drivers" are directly from the related SDK package, which comes from NXP. In that folder you can find the "clock_config.c" for the clock configuration and "pin_mux.c" for the pin configuration.

In our build environment we initialize the clock (and peripheral clocks) in "EwBspConfigSystem()" which is located in "ew_bsp_system.c". Inside this function we manage the clock with a standard function from the SDK package and also the external SDRAM. If you cannot find a suitable preconfigured clock init function in "clock_config.c", please use the datasheet or the NXP clock tool (it’s integrated in MCUXpresso) to find out what are the correct lines to initialize your board respectively the external crystal clock.

In the already mentioned file "pin_mux.c" you also can find the pin configuration for the UART interface and LCD API. For a LCD display, which needs to change the pins, it is the first to edit the related pin's within this file, for the UART interface it is the same. That is all the low level stuff that is recommended to do at first. Further on in "ew_bsp_display.c/EwBspConfigDisplay()" respectively "ew_bsp_serial.c" are the specific parts that are nessary to configure in case that you change the LCD and UART throw-out.

Embedded Wizard itself is the tool to design and generated your UI. To configure the hardware you have to edit the code with the IDE (or any text editor).

At the end of the Getting started with NXP: LPCXpresso54608 we also give a short guidance what's to do for a custom hardware.

I hope this helps.

 

Kind regards

 

Tim

 

Embedded Wizard Website | Privacy Policy | Imprint

...