Close
0%
0%

TM4C1294 USB Host for Logitech Extreme 3D Pro

Using the microcontroller to interface with the joystick.

Similar projects worth following

I think I got it right.

Create a new ccs project with no main.c

Copy the contents of the zip file into the project, overwriting any existing files.

Copy usbhhid.h into the appropriate directory

If your project has the startup_ccs.c and a tm4c1294ncpdt_ccs.c exclude the tm4c1294ncpdt_ccs.c from the build.

*The naming could be different, but if you have two startup files you will probably get three re-declarations. At any rate exclude the one that CCS generated from the build and use the one from the zip.

usbhid.h

C:\ti\TivaWare_C_Series-2.1.2.111\usblib\host

h - 24.44 kB - 08/18/2016 at 11:58

Download

usb_host_joystick.zip

I had originally mangled the byte order for the x and y, but it looks like it is fixed now. change line 15 in usb_host_joystick/include/usbhhidjoystick.c from #include "usblib/host/usbhhidjoystick.h" to #include "usbhhidjoystick.h"

x-zip-compressed - 253.34 kB - 08/17/2016 at 13:27

Download

  • Controlling an OWI arm with the joystick and microcontroller

    jlbrian708/25/2016 at 20:41 0 comments

  • Report Descriptor

    jlbrian708/17/2016 at 13:38 0 comments

    Report descriptor (packet) structure
    Byte.BitFunctionDescription
    0.7X7

    analog value X LSB

    0.6X6
    0.5X5
    0.4X4
    0.3X3
    0.2X2
    0.1X1
    0X0
    1.7Y5

    analog value Y LSB

    1.6Y4
    1.5Y3
    1.4Y2
    1.3Y1
    1.2Y0
    1.1X9

    analog value X MSB

    1X8
    2[4:7]H[1:4]hatswitch buttons
    2.3Y9

    analog value Y MSB

    2.2Y8
    2.1Y7
    2Y6
    3[0:7]Rzanalog value yaw (rotation)
    4[0:7]B[1:8]Buttons 1 to 8
    5[0:7]Tanalog throttle
    6[0:7]B[9:12]Buttons 9 to 12

    http://processors.wiki.ti.com/index.php/Stellaris_USB_Host_Joystick

  • Build

    jlbrian708/17/2016 at 11:34 0 comments


    **** Build of configuration Debug for project usb_host_joystick ****



    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
    'Building file: ../startup_ccs.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -O4 --opt_for_speed=5 --include_path="C:/ti/TivaWare_C_Series-2.1.2.111/examples/boards/ek-tm4c1294xl" --include_path="C:/ti/TivaWare_C_Series-2.1.2.111" --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/include" --include_path="C:/Users/JBrian/Documents/workspace/usb_host/usb_host_joystick/include" --advice:power=all -g --gcc --define=ccs="ccs" --define=PART_TM4C1294NCPDT --define=TARGET_IS_TM4C129_RA0 --diag_wrap=off --display_error_number --diag_warning=225 --gen_func_subsections=on --ual --preproc_with_compile --preproc_dependency="startup_ccs.d" "../startup_ccs.c"
    "../startup_ccs.c", line 236: remark #1527-D: (ULP 2.1) Detected SW delay loop using empty loop. Recommend using a timer module instead
    "../startup_ccs.c", line 254: remark #1527-D: (ULP 2.1) Detected SW delay loop using empty loop. Recommend using a timer module instead
    "../startup_ccs.c", line 272: remark #1527-D: (ULP 2.1) Detected SW delay loop using empty loop. Recommend using a timer module instead
    'Finished building: ../startup_ccs.c'
    ' '
    'Building file: ../usb_host_joystick.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -O4 --opt_for_speed=5 --include_path="C:/ti/TivaWare_C_Series-2.1.2.111/examples/boards/ek-tm4c1294xl" --include_path="C:/ti/TivaWare_C_Series-2.1.2.111" --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/include" --include_path="C:/Users/JBrian/Documents/workspace/usb_host/usb_host_joystick/include" --advice:power=all -g --gcc --define=ccs="ccs" --define=PART_TM4C1294NCPDT --define=TARGET_IS_TM4C129_RA0 --diag_wrap=off --display_error_number --diag_warning=225 --gen_func_subsections=on --ual --preproc_with_compile --preproc_dependency="usb_host_joystick.d" "../usb_host_joystick.c"
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/include/string.h", line 186: remark #1527-D: (ULP 2.1) Detected SW delay loop using empty loop. Recommend using a timer module instead
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/include/string.h", line 200: remark #1527-D: (ULP 2.1) Detected SW delay loop using empty loop. Recommend using a timer module instead
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/include/string.h", line 200: remark #1527-D: (ULP 2.1) Detected SW delay loop using empty loop. Recommend using a timer module instead
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/include/string.h", line 214: remark #1527-D: (ULP 2.1) Detected SW delay loop using empty loop. Recommend using a timer module instead
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/include/string.h", line 316: remark #1527-D: (ULP 2.1) Detected SW delay loop using empty loop. Recommend using a timer module instead
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/include/string.h", line 316: remark #1527-D: (ULP 2.1) Detected SW delay loop using empty loop. Recommend using a timer module instead
    "../usb_host_joystick.c", line 156: remark #1534-D: (ULP 7.1) Detected use of global variable "g_ui32NumHostClassDrivers" within one function "main". Recommend placing variable in the function locally
    "../usb_host_joystick.c", line 164: remark #1534-D: (ULP 7.1) Detected use of global variable "g_psJoystick" within one function "main". Recommend placing variable in the function locally
    "../usb_host_joystick.c", line 164: warning #552-D: variable "g_psJoystick" was set but never used
    'Finished building: ../usb_host_joystick.c'
    ' '
    'Building file: C:/ti/TivaWare_C_Series-2.1.2.111/examples/boards/ek-tm4c1294xl/drivers/pinout.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -O4 --opt_for_speed=5 --include_path="C:/ti/TivaWare_C_Series-2.1.2.111/examples/boards/ek-tm4c1294xl"...

    Read more »

  • Output

    jlbrian708/17/2016 at 11:30 0 comments

  • Created / Modified Files

    jlbrian708/17/2016 at 11:29 0 comments

    usb_host_joystick.c

    include/usbhhidjoystick.h

    include/usbhhidjoystick.c

    TivaWare_C_Series-2.1.2.111/usblib/host/usbhhid.h

View all 5 project logs

Enjoy this project?

Share

Discussions

Madhusudan Kumar wrote 10/24/2017 at 09:00 point

I am getting errors like 

USBH_EVENT_HID_JS_S is undefined 

USBH_EVENT_HID_JS_Rz is undefined 

USBH_EVENT_HID_JS_X is undefined

Almost all these events are throwing the error to me. 

  Are you sure? yes | no

drakehornbridge wrote 01/24/2017 at 15:46 point

I really like this project but seem to be having difficulties replicating your results for another device. Do you have any suggestions for me?

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates