LPC54018 IOTmodule (OM40007) - clock config tool breaks SDK example

cancel
Showing results for 
Search instead for 
Did you mean: 

LPC54018 IOTmodule (OM40007) - clock config tool breaks SDK example

362 Views
larsen
Contributor III

I have LPC54018 IOTmodule (OM40007). I do the following on a freshly extracted project from the SDK: lpc54018_dev_cdc_vcom_bm. Module is connected to debugger and to host (win10/64) via USB.

A) Compile and debug.

A1) Nothing happens on the USB - no connection.

A2) It turns out the code is not adapted to LPS54018IOT without a carrier board. It uses USB-FS where it should use USB-HS. But it is easy to fix in usb_device_config.c line 31+

*! @brief LPC USB IP3511 FS instance count */
#define USB_DEVICE_CONFIG_LPCIP3511FS (1U) //<-- should be 0U and not 1U

/*! @brief LPC USB IP3511 HS instance count */
#define USB_DEVICE_CONFIG_LPCIP3511HS (0U)  //<-- should be 1U and not 0U

A3) Now it compiles and works fine with data communication on USB - no data errors. Fine

B) Now open the clock_config tool. Select this project.

B1) Dont change anything but ask the tool to update project.

B2) Recompile

B3) Now there is a compile error - the tool has removed the code called in virtual_com.c line 646

BOARD_BootClockFROHF96M();

so this does no more exist. If this line is changed to what the clock_config tool expects to be the entry point to its clock setup:

BOARD_BootClockRUN();

the code compiles again.

B4) Debugging however gives the USB error to request the USB device descriptor.

I see a couple of issues:

1) The example is not prepared for the board setup (IOTModule in stand-alone): Wrong usb adapter.

2) The example is not adapted to the clock-config tool - it breaks the compilation and also introduces subtle design errors.

3) Although not reported here, also the pin config tool alters the structure of the relevant files. Although I have not detected any issues with regard to the function it does give some uncertainty if the change is real or just cosmetic (i dont consider til yaml part)

I would expect the board and tool to be compatible with the supplied examples without any special edits to the code. The clocking scheme is very complicated in itself and mixing into this a tool which does not work correctly - I see days of debugging are gone.

br henning

0 Kudos
3 Replies

270 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello henning,

-Thanks for your some sharing, I also think the default parameters of SDK demo based on LPC54018 IOT module should corresponding with board, just like you mentioned by A2.

- About the clock_config tool, the SDK demo about clock configuration not developed by clock_config tool, the code

is directly write. And configure clock_config tool can generate code, while conversely not work, through code can't generate related clock config on clock_config tool.

After you open the clock_config tool, all the configuration is default, not the same with demo code, so when you update project, it shows error. You can refer  to your requirement to configure on clock_config tool.


Have a great day,

TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

270 Views
larsen
Contributor III

Hello Alice,

Thanks for quick reply. Yes I also understand that clock setup is hand-coded and not compatible with clock-config tool. (what about pin-config tool?).

I hope I can convince NXP how ridiculous this is. If you have tools and examples meant to help the user get started, then this _has_ to work without any special knowledge from the user. After all the tool is there to help the user not to make it more complicated.

The examples _must_ present a working baseline from where the user can iterate. Trouble already at startup level are very annoying because you as a new user dont know if you have to look for error in the tool, the selected hardware or the code!

So is my opinion.

br henning

0 Kudos

270 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello henning,

1) "What about pin-config tool?"

-> I checked some demos, find that the pin configuration code is generated by pins config tool.

If you want to use these config tools, I recommend you create a new SDK project, then config as your requirement.

2)Thanks very much for your suggestion, I agree with you, we will improve the example support, sorry for the inconvenient to you.


Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos