Hello, I have a question about how to use the USB HMSC Driver on FreeRTOS.
I managed to get the RZT2M_RSK_usb_hmsc_Rev110 sample code running, but the functions called requires to configure the project as bare metal. As my current project requires to use FreeRTOS, what are the functions needed to be called and in what order so USB HMSC Driver can be properly initialized and configured?
As I understand, the main loop in src/usb_thread_entry.c calls the function R_USB_EventGet (rzt/fsp/src/r_usb_basic/r_usb_basic.c) which does nothing on FreeRTOS but sets the event on bare metal. 



  • Hi Yip-Ho,
    Our team is investigating your issue and will reach to you soon.
    Kind Regards.

  • The RZT2M_RSK_usb_hmsc_Rev110 sample code is not prepared with FreeRTOS but in bare metal. You can create your own project with FreeRTOS and port the sample bear metal code to your FreeRTOS project. As the FSP configurator create the same APIs in driver level so, I think  the porting effort from bear metal to the FreeRTOS should be low.   

  • Hi Kazi, on version 1.3.0 of FSP configurator the USB_HSMC driver is nowhere to be found. I actually had to copy paste the driver directory of the sample code into my project. But I am working on the port atm.
    best regards.

  • Hello

    Yes, it seems for the time being you need to port it from the sample code directly, while the USB_HMASC driver is not yet included in FSP. It is mentioned in the Release Note for RZ/T2M Example program package. I hope Renesas will add the USB_HMASC drive in next FSP releases.

  • Hello,
    I managed to run the tasks needed for the USB HMSC driver.
    However I would need to check the value of the USBSTS and the USBINTR registers on e2studio. Is there a way to do that ?
    Best regards,

  • Hi Yip-Ho,

    to show registers of a controller during a debug session, you have to use the "IO Registers" view. To open IO Registers view select menu Renesas ViewsDebugIO Registers.

    Following description is from the e2studio help function for "IO registers":

    When opening the IO Registers view for the first time, it shows only a list of module names.

    To show IO register names, addresses, access and values, click the ">" symbol to the left of a module name. The module will be expanded and show name, address and value of the registers.

    To show memory content at the bit level, the IO registers can be expanded in the same way as described above.

    To edit the value of an IO register, enter a hex/binary value directly in the value column and hit the Enter key. The new value will be written into the register.

    Best regards,


  • Hello Andreas and thanks for your tip!
    It seems we can even set some event break in case IO register turn from 0 to 1.
    I can see the button for but for some reason it is grayed out.
    Is there a way to enable it ?

    best regards,

  • Hi Yip-Ho,

    you selected this feature on field level PTCGIE inside the USBHC.USBINTR register.

    When you do the same directly on the register level the feature "Add Event Break" is existing/enabled:

    Best regards,