cancel
Showing results for 
Search instead for 
Did you mean: 

VS-Code extension 3.5.1: HardFault during USBX initialization on STM32U5A5

PierreB
Associate

I'm trying the new VS-Code extension 3.5.1, but I end up in the HardFault_Handler function during the initialization, in the "MX_USBX_Device_Init" function. The same project works correctly when using the "cortex-debug" plugin (separate VS Code profile to avoid conflicts).

It's a very simple project where I did the very minimal config to enable USBX, and "UX Device HS -> Device Class HS -> HID -> MSC" on my STM32U5A5AJH6Q. The IOC file is attached.

It crash in the function "USBD_FrameWork_MSCDesc", at line

  /* Append Endpoint descriptor to Configuration descriptor */
  __USBD_FRAMEWORK_SET_EP((pdev->tclasslist[pdev->classId].Eps[1].add),
                          (USBD_EP_TYPE_BULK),
                          (uint16_t)(pdev->tclasslist[pdev->classId].Eps[1].size),
                          (0U), (0U));

 

0 REPLIES 0