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.

SK-AM64B: AM64 as USB Host

Part Number: SK-AM64B
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hello, i am trying to make AM64 work as USB Host and control the USB from R5 core so i cannot use Linux Drivers for USB Host. I am using AM64 SK EVM Board. I am taking cdc_echo example as my base and move forward from there. I recompiled according makefile and i made a new file called hcd.c for host porting layer functions. I am only trying to initializition right now and i filled the functions hcd_init, hcd_int_enable functions. These functionss parameters are coming from usb_handle so it looks exactly like the dcd.c but usb_handle object is different due to my tusb_config.h and tusb_options.h I am also updating gUsbInitParam's last parameter 1 to initialize AM64 as host. But when i do this, in usbDeviceInit my code goes to HwiP_data_abort_handler_c. Why might that happen?

And as a general question, moving from cdc_echo example, what must be changed/added to use AM64 as USB Host?

Edit: İf i arrange the USB mode as USB Host in USB3P0SS_W1 register, i am having data abort when reaching the register CSL_USB3P0SS_CTRL_DEV_USB_CONF_USB3DIS. Why does this happen? Are there any problem with the host configuration? Or is this because CSL_USB3P0SS_CTRL_DEV_USB_CONF_USB3DIS is device register and when i dont make the device configuration i cannot reach the register?

  • Hi Murat,

    i am trying to make AM64 work as USB Host and control the USB from R5 core so i cannot use Linux Drivers for USB Host.

    For AM64x devices the USB Host functionality is not supported via current MCU+SDK offering. Please refer USB_DEVICE_DRIVER. 

    But when i do this, in usbDeviceInit my code goes to HwiP_data_abort_handler_c. Why might that happen?

    Have you done the Pinmux configuration for USB via Sysconfig? 

    Regards,

    Tushar

  • Hello Tushar

    Yes, as i mentioned i am using CDC_Echo example as my base and pinmux is made via Sysconfig.

    I know that USB Host functionality is not supported in SDK. Thats why i am trying to implement my own.

  • Hi Murat,

    Yes, as i mentioned i am using CDC_Echo example as my base and pinmux is made via Sysconfig

    Thanks for the confirmation.

    CSL_USB3P0SS_CTRL_DEV_USB_CONF_USB3DIS is device register and when i dont make the device configuration

    Yes, this is correct. USB device registers will not be accessible when the controller operates in host mode.

    I know that USB Host functionality is not supported in SDK. Thats why i am trying to implement my own.

    USB host related functionality are not tested and implemented in the current SDK, so queries related to host functionality will not be supported on E2E.

    Regards,

    Tushar

  • Hello Tushar

    Thanks for fast reply, if i cannot reach the device registers in host mode, why does usbDeviceInit() function in usb_wrapper.c is trying to reach to that register no matter my configuration? usb_wrapper.c file is under Cadence files and i believe it is supposed to work both for host mode and device mode. Is it correct?

    Thank you.

  • Hi Murat,

    usb_wrapper.c file is under Cadence files and i believe it is supposed to work both for host mode and device mode. Is it correct?

    The usb_wrapper.c file is not cadence provided file. This is the wrapper code defined by TI and has USB device related configuration.

    Regards,

    Tushar

  • Hi Tushar

    Thank you for your fast response.