I found the issue in usb example demo coming form SDK_2.9.1_LPCXpresso55S69.
At initialization there is the following code:
/* enable usb0 host clock */
CLOCK_EnableClock(kCLOCK_Usbhsl0);
/*According to reference mannual, device mode setting has to be set by access usb host register */
*((uint32_t *)(USBFSH_BASE + 0x5c)) |= USBFSH_PORTMODE_DEV_ENABLE_MASK;
/* disable usb0 host clock */
CLOCK_DisableClock(kCLOCK_Usbhsl0);
it looks to be a WA, this section of code looks to be not a good practice programming therefore optimized code is not doing exactly what is expected to do.
The solution I found:
volatile uint32_t usbfsh_offset=0x5c;
/* enable usb0 host clock */
CLOCK_EnableClock(kCLOCK_Usbhsl0);
/*According to reference mannual, device mode setting has to be set by access usb host register */
*((uint32_t *)(USBFSH_BASE + usbfsh_offset)) |= USBFSH_PORTMODE_DEV_ENABLE_MASK;
/* disable usb0 host clock */
CLOCK_DisableClock(kCLOCK_Usbhsl0);
There is a lot of examples applying same WA as bad practice of coding at SDK_2.9.1_LPCXpresso55S69/boards/lpcxpresso55s69/usb_examples.
I hope this contributes to NXP team and take it for consideration for demo quality.