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.

TMDS243EVM: USB Control In Python

Part Number: TMDS243EVM

Tool/software:

I am trying to access the Sitara processor by USB interface on AM243x EVM board.

I configured the boot mode as DEV ENG mode.

The API functions in CDC class were able to access the Soc through USB in CCS environment.

Then I tried to communicate with the Soc from my host by Python codes using APIs in pyusb class.

The device can be found by the APIs in Python.

But there are issues from drivers of the CDC port.

I installed the drivers for it in Zadig tool.,

If the WinUSB driver is installed, the USB configuration can be setup in Python code, but the USB write to the specified endpoint cannot execute as below.

Also the API from CDC class cannot find USB port in CCS environment.

  

If the CDC driver is installed, the USB can be controlled by CDC functions in CCS code, but USB configuration cannot be setup at all in my Python code.

It seemed there are conflicts between CDC and WinUSB drivers..

I need some guidance from USB expert on this.

Thanks.

Thanks & Best regards

Hao (Wang hao)

  • Hi Hao,

    Thanks for reaching out to Texas Instruments E2E support forum.

    I have taken your inputs and working on it. Please allow some time to revert back.

    Regards,

    Tushar

  • Tushar

    Thanks for response.

    I am trying to setup the communication from Win10 to processor.

    I will use the APIs from Pyusb lib in Python to control the USB port at host side, and use APIs from CDC class to access the USB FIFO at Soc side.

    I think this is the easiest approach for a fresher to implement the communication.

    But even when I upgraded the Zadig tool to latest version (2.9), neither the WinUSB nor CDC driver from the tool cannot make the Python codes work.

    I believe there should have some successful examples for this before.  

    Please provide some guidance.

    Thanks.

    Thanks & Best regards

    Hao (Wang hao)

  • Tushar

    I can figure out it now.

    The API functions from PySerial lib should be called to control the USB CDC port. 

    I can setup the communication now.

    Thanks.

    Thanks & Best regards

    Hao (Wang hao)

  • I think the USB port is mapped to serial port in host.

    So, it is the right path to install CDC driver at Soc side, and control USB by functions from PySerial library.

    Thanks.

    Thanks & Best regards

    Hao (Wang hao)