How to edit headers generated by USB host configuration tool

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to edit headers generated by USB host configuration tool

3,285 Views
Antun
Contributor I

Hi I have a question related to peripheral configuration tool.
I have configured LPC55569 MCU to act as a USB host and enabled USB CDC auto-configuration for attached device.

The problem is that generated `usb_host_config.h` header file contains #define USB_HOST_CONFIG_CONFIGURATION_MAX_INTERFACE (5U) which I need to change to different value via Peripheral Config Tools tab.

The problem is that I cannot find that option in IDE. The only thing that I got is the shown in the screenshot provided.

0 Kudos
Reply
4 Replies

3,239 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello Antun.

I'm Pavel I will support your issue.

The code from usb_config.h is not directly modified by the config tools, I suggest you modify this value manually.

Pavel_Hernandez

0 Kudos
Reply

3,217 Views
Antun
Contributor I

Hi Pavel,

but it seems that the tools actually does change that line.
After I have set it manually to value 15, after generating the code, the value
is reverted back to value 5.

I have attached screenshot showing the change being made by the IDE tool.

BR,

Antun

0 Kudos
Reply

3,141 Views
marek_neuzil
NXP Employee
NXP Employee

Hello Antun,

The usb_host_config.h header file is generated as a parameterized template. The USB_HOST_CONFIG_CONFIGURATION_MAX_INTERFACE definition is generated as a fixed value now. It means that all changes are overwritten whenever you update the code. You must uncheck the code update of the header file to preserve your changes. See the following screenshot:

marek_neuzil_0-1645707519060.png

But this solution should be used when all USB host settings are selected. When you disable update of the header file any modification of the USB host configuration in the USB component UI will not be applied in your application code.

Best Regards,

Marek Neuzil

0 Kudos
Reply

3,183 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello Antun

I'm review your case, thanks for the acclamation.

I will check the support of that macro with the config tool.

Regards

Pavel_Hernandez

0 Kudos
Reply