This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C6747 BIOSUSB usbdevhid example does not work?

Other Parts Discussed in Thread: TPS2065, CCSTUDIO

I am now working on USB of C6747. We made our own board which refer to the schematic of EVMC6747/L-137 of Spectrum Digital. The schematic of USB part is in the following figure. R64 is populated and R63 is no-pop so that C6747 works in device only mode. L1 is no-pop, because C6747 work in device mode and need not source the power. R51 is populated and R46 is no-pop to disable TPS2065.

We use usbdevhid example in C:\CCStudio_v3.3\biosusb_01_00_00\packages\ti\biosusb\examples. After we download the program and connect our board to PC, there is no response on PC side. I just want to know why? The Execution graph is below. It looks like the Jungo_xx function does not wok. Why? When will the Jungo_xx function be called?

In addition, I found the following code in bios_sample_main.c.
/* extern funciton declaration */
extern int dsp_bios_entry(void *arg);

 /*
* \brief : DevHidAppMain
*      This is entry function for the function driver,
*     invokes the dsp_bios_entry() which inturns initialzes
*     stack and load function driver
*     refer hid_init.c for stack args initialization
* @param : none
* @return : none
*/
void DevHidAppMain(void)
{
 printf("KeyBoard HID Test Application\n");

 /* this function inturn calls the jstart_stack(),
       jstart_stack() calls the get_uw_args() to get
       device stack arguments initialized in hid_init.c
    */
 dsp_bios_entry(NULL);

 /* loop for ever */
  while(1);
}

I can not found any infomation about the function dsp_bios_entry(). What this function used for? Is there any API reference guide about it?

 I will very appreciate your help!

  • After I populate the L1 inductor, everything works well. I forgot to power the USB_VBUS pin. Both HID and MSC example can work. MSC example show no driver on PC which I guess the reason is that my board does not have any MMC/SD or NAND Flash.

    I also use the sprufm9a.pdf code and thread https://community.ti.com/forums/t/5103.aspx?PageIndex=1 to initialize the USB 2.0 controller and PC recognize it as an Unknow device which I think there is no Enumerate services in the code. The code is as follows:
    void usb_init3()
    {
     Uint16 I;
     volatile Uint32 value =0;
     #define CFGCHIP2_USB_PHYCTR 0x01C14184

        unsigned int reg = 0;

     // **************************************************************************
     // Configure DRVVBUS Pin to be used for USB; Muxed with GPIO4[15]=Bank4 GP15
     // PINMUX9[4]=1 and PINMUX9[7]=0
     // **************************************************************************
     // MAKE SURE WRITE ACCESS KEY IS INITIALIZED PRIOR TO ACCESSING ANY OF THE
     // SyscfgRegs REGISTERS.
     SyscfgRegs->KICK0R = 0x83e70b13; // Write Access Key 0
     SyscfgRegs->KICK1R = 0x95A4F1E0; // Write Access Key 1
     SyscfgRegs->PINMUX9 |= (0x1 << 4); // Set bit4 Pinmux9 for USB Use
     SyscfgRegs->PINMUX9&= 0xFFFFFF7F; // Clear bit 7 Pinmux9 for USB Use

     // Reset the USB controller:
     usbRegs->CTRLR |= 0x00000001;
     //Wait until controller is finished with Reset. When done, it will clear the RESET bit field.
     while ((usbRegs->CTRLR & 0x1) == 1);

     // RESET: Hold PHY in Reset
     SyscfgRegs->CFGCHIP2 |= 0x00008000; // Hold PHY in Reset
     // Drive Reset for few clock cycles
     for (I=0; I < 50; I++);
     // RESET: Release PHY from Reset
     SyscfgRegs->CFGCHIP2 &= 0xFFFF7FFF; // Release PHY from Reset

        
        *(volatile unsigned int *)CFGCHIP2_USB_PHYCTR = 0x09F2;
        reg = *(volatile unsigned int *)CFGCHIP2_USB_PHYCTR;
        reg |= (1 << 4) | (1 << 5) | (1 << 6) | (1 << 8) | (1 << 11);
        reg &= ~((3 << 13));
        *(volatile unsigned int *)CFGCHIP2_USB_PHYCTR = reg;
        while (!(*(volatile unsigned int *)CFGCHIP2_USB_PHYCTR & (1 << 17)))
            ;

     #ifndef HS_ENABLE
     // Disable high-speed
     CSL_FINS(usbRegs->POWER,USB_OTG_POWER_HSEN,0);
     #else
     // Enable high-speed
     CSL_FINS(usbRegs->POWER,USB_OTG_POWER_HSEN,1);
     #endif
     // Enable Interrupts
     // Enable interrupts in OTG block
     usbRegs->CTRLR &= 0xFFFFFFF7; // Enable PDR2.0 Interrupt
     usbRegs->INTRTXE = 0x1F; // Enable All Core Tx Endpoints Interrupts + EP0 Tx/Rx interrupt
     usbRegs->INTRRXE = 0x1E; // Enable All Core Rx Endpoints Interrupts
     // Enable all interrupts in OTG block
     usbRegs->INTMSKSETR = 0x01FF1E1F;
     // Enable all USB interrupts in MUSBMHDRC
     usbRegs->INTRUSBE = 0xFF;
     // Enable SUSPENDM so that suspend can be seen UTMI signal
     CSL_FINS(usbRegs->POWER,USB_OTG_POWER_ENSUSPM,1);
     //Clear all pending interrupts
     usbRegs->INTCLRR = usbRegs->INTSRCR;

     // Set softconn bit
     CSL_FINS(usbRegs->POWER,USB_OTG_POWER_SOFTCONN,1);
     while ((usbRegs->DEVCTL & 0x01) == 0); //Stay here until controller goes in Session.
    }

    Finally, the USB goes in session.

    //************************************************************************************************************************************************************
    And I still can not found any infomation about the function dsp_bios_entry(). What this function used for? Is there any API reference guide about it?

    Also, we want to use the USB controller to communicate with an application which will be developed by ourself on PC. Can we use HID or MSC to implement that and how? Or must we develop the firmware and windows driver ourself? Is there any example to follow?