AnsweredAssumed Answered

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

Question asked by henning larsen on Apr 23, 2019
Latest reply on May 4, 2019 by Alice_Yang

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

Outcomes