Device detected but not identifyed: RX651 + Windows 10

Hi everyone.

I want connect my RX651 to Windows 10 PC through USB but I'm getting some problems.

I'm trying to test the "RX Family Sample Program using USB Peripheral Communication Device Class Driver (PCDC) to communicate via USB with USB Host Firmware Integration Technology - Sample Code", who use the r_usb_basic and r_usb_pcdc FIT modules.

When I run this example Windows detects a new USB device but can't identify it. Windows doesn't found any VENDOR, ID or another information from the RX651. I have tried to change the configuration of the ID and VENDOR but windows always detects it as "USB device \ VID_0000 & PID_0002",(regardless of what values have I configured) without any hardware, manufacturer or other own information. I think the key is the red part, ¿why windows detects always that VID and PID configuration if I'm configuring other different?

If I run the board in bootloader mode, Windows detects and identify the board successfully as COM & LPT device (USB\VID_045B&PID_0244\5&19474940&0&4).

In both cases I have update windows drivers and installed CDC_Demo driver that Renesas provide in r_usb_pcdc FIT (\src\smc_gen\r_usb_pcdc\utilities\CDC_Demo.inf).

I have also tested another Renesas demo code where it explain step by step how configure the serial USB conection, but I have the same results. Tried in both Windows 7 and Windows 10 (64 bits).
(www.renesas.com/.../renesas-e-studio-smart-configurator-application-examples-cmt-ad-sci-dma-usb

As I'm using official Renesas examples I might suppose it can be Windows problem, maybe some drivers problem but I have installed the oficial Renesas driver too.

I haven't found any solutions in other open topics so I would appreciate any help. I can provide the example codes or anything you need.

Thanks,

Raúl

  • Hello RaulDismuntel!

    How's it going? Have you tried any fix  from Windows such as this: https://answers.microsoft.com/en-us/windows/forum/windows_10-hardware/unknown-usb-device-device-descriptor-request/7aa05689-ec10-474d-9fe7-5c140e01e380

    Anyways, I hope you could wait for our experts to give you a definite answer soon.

    All the best!

    Sai
    RenesasRulz Forum Moderator

    https://renesasrulz.com/
    https://academy.renesas.com/
    en-support.renesas.com/knowledgeBase

  • Which board are you using? Does it have a source for 48MHz USB clock?

  • C S Yep, you hitted the nail in the head. I'm working with a custom board and I haven't checked the USB SCKCR2 (USB Clock) !!! Thank you so much!!

    Now Windows correctly detects and identifies the conexión as USB Serial Device. Then I have reinstalled the CDC_Demo driver and Windows detects it correctly too as Renesas CDC USB Demonstration.

    However I'm having problemas when I run the demo code and connect to a PC terminal (Tera, RealTerm, ...).

    When I try to connect to the RX651 COM port, the terminal software blocks itself and results in timeout or conexion error.

    This is the Renesas Demo code I'm using 

    /***********************************************************************
    *
    * FILE : Proyecto_USB_tutorial.c
    * DATE : 2021-04-09
    * DESCRIPTION : Main Program
    *
    * NOTE:THIS IS A TYPICAL EXAMPLE.
    *
    ***********************************************************************/
    #include "r_smc_entry.h"
    #include "r_usb_basic_if.h"
    #include "r_usb_pcdc_if.h"
    #include "r_usb_pcdc_descriptor.h"
    #include <stdio.h>
    #include <string.h>
    #include "pin.h"

    #define FALSE false
    #define TRUE true
    #define OFF 0
    #define ON 1

    void R_USB_PinSet_USB0_PERI(); /* Initialize USB0_VBUS pin */
    static uint8_t g_buf[1]; /* Variable to store input character from PC terminal */
    volatile unsigned int flag_start = 1; /* Flag to print start message */
    volatile uint16_t interval_level = 1; /* Variable to change CMT0 interval */
    static char print_str[120]; /* String to print message at PC terminal */
    volatile uint32_t slength; /* String length */

    extern uint8_t g_apl_device[];
    extern uint8_t g_apl_configuration[];
    extern uint8_t *g_apl_string_table[];
    const static usb_descriptor_t usb_descriptor =
    {
    g_apl_device, /* Pointer to the device descriptor */
    g_apl_configuration, /* Pointer to the configuration descriptor for Full-speed */
    USB_NULL, /* Pointer to the configuration descriptor for Hi-speed */
    USB_NULL, /* Pointer to the qualifier descriptor */
    g_apl_string_table /* Pointer to the string descriptor table */
    };

    void main(void);

    static usb_status_t status;


    void main(void)
    {
    R_Pins_Create();

    /************************************************************************************************/

    usb_ctrl_t ctrl;
    usb_cfg_t cfg;

    /* Start CMT0 counter operation*/
    R_Config_CMT0_Start();

    R_USB_PinSet_USB0_PERI(); /* USB MCU pin setting */

    ctrl.module = USB_IP0; /* USB0 module */
    ctrl.type = USB_PCDC; /* Peripheral Communication Device Class*/
    cfg.usb_speed = USB_FS; /* USB_HS/USB_FS */
    cfg.usb_mode = USB_PERI;
    cfg.p_usb_reg = (usb_descriptor_t *)&usb_descriptor;
    R_USB_Open(&ctrl, &cfg); /* Initializes the USB module */

    /* Loop back between PC Terminal and USB MCU */
    while (1)
    {
    status = R_USB_GetEvent(&ctrl);
    switch (status)
    {
    case USB_STS_CONFIGURED :
    break;

    case USB_STS_WRITE_COMPLETE :
    /* Read the input from PC terminal*/
    R_USB_Read(&ctrl, g_buf, 1);
    break;

    case USB_STS_READ_COMPLETE :
    /* Clear start message flag*/
    flag_start = 0;
    /* Instruction to slow down blinking rate is received */
    if (('a' == *g_buf)|| ('A' == *g_buf))
    {
    /* Get new blink interval level. Maximum level is 9. */
    if (interval_level < 10)
    {
    /* Notify the character received and inform next action */
    sprintf(print_str, "\r\n Character 'a' or 'A' is received. LED2 will blink at slower rate.\r\n");
    interval_level++;
    }
    else
    {
    sprintf(print_str, "\r\n This is minimum. Please press 'b' or 'B' to blink faster. \r\n");
    }
    }
    else if (('b' == *g_buf)|| ('B' == *g_buf))
    {
    /* Get new blink interval level. Minimum level is 1 */
    if (interval_level > 1)
    {
    /* Instruction to increase blinking rate is received */
    sprintf(print_str, "\r\n Character 'b' or 'B' is received. LED2 will blink at faster rate.\r\n");
    interval_level--;
    }
    else
    {
    sprintf(print_str, "\r\n This is maximum. Please press 'a' or 'A' to blink slower. \r\n");
    }
    }
    else
    {
    sprintf(print_str, "\r\n Press keyboard to control the blinking rate of LED2 (not case sensitive)\n\r\n a ----> Slower\n\r\n b ----> Faster\n\r\n");
    }
    /* Print message at PC terminal */
    slength = strlen(print_str);
    R_USB_Write(&ctrl, (uint8_t *)print_str, slength);

    /* Change blinking rate */
    //CMT0.CMCOR = (uint16_t)(5000 * interval_level);
    break;

    default :
    R_BSP_NOP();
    break;
    }

    if (flag_start == 1)
    {
    /* Print start message until the 1st input from PC host is received */
    sprintf(print_str, "Press space bar twice to start ...\r ");
    slength = strlen(print_str);
    R_USB_Write(&ctrl, (uint8_t *)print_str, slength);
    }
    }

    }

  • Another possible problem is if you transfer multiples of 64-bytes, the PC side is waiting for more data. You should then send a ZLP (zero length packet). R_RSUB_Write( &ctrl, print_str, 0);

    I dont know if you have hit this problem.. Could you check length of your transfers before "hung" 

  • 您好,有个问题可以请教一下吗?就是关于那个HIDreportscr应该怎么设置的呢?希望可以交流qq :1192028868