Hello,
I have the IMXRT1050 eval board with MIMXRT1052DVL6B and I wanted to set up a new project using the USB connector to create a virtual COM port, just like in the SDK example project.
So I created a new (empty) project with USB middleware included, set my clock to 588 MHz by disabling ARM_PLL bypass (PLL1_BYPASS -> ARM_PLL) and then in the Peripherals Tool in the Middleware section I added one USB entry with
Mode: Device,
Peripheral: USB1,
Preset: CDC VCOM.
After that, I had to enable the clock for USB1 and then I could generate the code.
When I start debugging my code (nothing else added here, except the generated code), the initialization fails during USB_DeviceEhiSetDefaultState() in the line
/* Enable USB Interrupt, USB Error Interrupt, Port Change detect Interrupt, USB-Reset Interrupt*/
ehciState->registerBase->USBINTR =
(USBHS_USBINTR_UE_MASK | USBHS_USBINTR_UEE_MASK | USBHS_USBINTR_PCE_MASK | USBHS_USBINTR_URE_MASK
When reaching this line by debugging step-by-step, the debugger hangs up in this line, can not proceed after clicking on pause or stop, I get a window with the error message "Interrupt failed."
Normally I assume that automatically generated code should run out of the box, but here it seem like it does.
So what could be the reason that it doesn't work?
Remark: I didn't select the eval board in the wizard, I just selected the microcontroller I use, because later this project should also run on a custom board. So for example I don't use the boards additional RAM and Flash.