Skip to main content
Associate II
October 1, 2025
Solved

Can't configure USB Host for STM32WBA on STM32CubeMX

  • October 1, 2025
  • 2 replies
  • 340 views

I'm trying to use STM32CubeMX directly or via STM32CubeIDE, and I can't find a way to configure ThreadX + USBX Host for STM32WBA65 boards such as NUCLEO-WBA65RI or STM32WBA65I-DK1.    Only Device classes show up.

I've also tried to do it using the part directly instead of a board or example, and even then I only see Devices under X-CUBE-AZRTOS-WB > USB USBX > USBX from the Software Component view.

I have noticed a few things

  • There is no X-CUBE-AZRTOS-WBA  only WB under select Components, but they are both there under Manage Software Packs
  • I must change HSE to Bypass to have USB_OTG_HS enabled under connectivty.
  • Even after configuring USB_OTG_HS to Host Only there are no UX Host parts showing in the Compnents under X-CUBE-AZRTOS-WB > USB USBX > USBX.
  • Pinout & Configuration there is a separate THREADX and USBX between i-CUBE-wolfTPM and X-CUBE-AI which looks like I can turn on at the same time as the normal ThreadX per MCU Line.

Is there an example of USB Host on STM32WBA65 and is there an available board we can validate this on?

    Best answer by STTwo-32

    Hello @noela and welcome to the ST Community.

    The STM32WBA series should have a native support for Azure RTOS. So, no need for an X Cube to do so. The option to select the X-Cube-AZRTOS WB should be disabled for the STM32WBA series (already escalated internally under internal ticket number 210018). 
    USBX And ThreadX examples are available on the attached link on the STM32CubeWBA that can be used on the NUCLEO-WBA65RI.

    Best Regards.

    STTwo-32

    2 replies

    Ghofrane GSOURI
    Technical Moderator
    October 2, 2025

    Hello @noela 

    You can use the " ThreadX + USBX Host for STM32WBA65 boards such as NUCLEO-WBA65RI ".

    Please check my IOC .

    I will be waiting for your feedback 

    THX

    Ghofrane

    To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
    STTwo-32
    STTwo-32Best answer
    Technical Moderator
    October 2, 2025

    Hello @noela and welcome to the ST Community.

    The STM32WBA series should have a native support for Azure RTOS. So, no need for an X Cube to do so. The option to select the X-Cube-AZRTOS WB should be disabled for the STM32WBA series (already escalated internally under internal ticket number 210018). 
    USBX And ThreadX examples are available on the attached link on the STM32CubeWBA that can be used on the NUCLEO-WBA65RI.

    Best Regards.

    STTwo-32

    noelaAuthor
    Associate II
    October 6, 2025

    Okay, so I should just USBX and ThreadX by themselves, not the ones under STM32WB.   While this builds, I don't actually see USB devices show up.   I've tried the following two boards:

    MB2130A on MB1801D and MB21230A on MB2143A   (Nucleo-WBA65RI & STM32WBA65I-DK1)    In both cases, neither Ux_Host_HID nor Ux_Host_HID_Standalone detected when I plugged in a device into CN9.     However I was able to get USB detected and running on a STM32F767 dev board that I configured manually with STM32CubeMX.

     

    Steps to repro:

    $ git clone --recursive https://github.com/STMicroelectronics/STM32CubeWBA.git

    $ cd STM32CubeWBA

    $ git pull

    $ git submodule update --init --recursive

    $ stm32cubeide

    Then from the IDE, I use File > Open Project from File System.    I navigate to STM32CubeWBA/Projects/NUCLEO-WBA65RI/Applications/USBX/Ux_Host_HID select the STM32CubeIDE and add it to the project.  I do the same for STM32CubeWBA/Projects/NUCLEO-WBA65RI/Applications/USBX/Ux_Host_HID_Standalone.    

    In both cases, I build and debug just fine.   I see the following printed out:

    USB Host library started.

    Starting HID Application
    Connect your HID Device
    **** USB OTG HS in HID Host ****

    However, plugging devices in CN9, does not result in them getting detected.   I have tried with the projects as is, I've tired changed the USB to 12 and 1.5Mb/s.   I never see anything detected.   I see    _ux_hcd_stm32_periodic_schedule getting called, but ed is always NULL and nothing happens.

    /* Get the first ED in the periodic list. */

    ed = hcd_stm32 -> ux_hcd_stm32_periodic_ed_head;

    (in _ux_hcd_stm32_periodic_schedule.c)