Replies: 2 comments 4 replies
-
no, TinyUSB can be run on any custom board with supported MCUs. |
Beta Was this translation helpful? Give feedback.
2 replies
-
Here is a simple non freeRTOS setup I tried. The device still shows up on my device manager but it fails to retrieve the descriptor. I believe I have followed all the steps but my debugger never reaches the functions defined in |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello all:
I recently discovered tinyUSB and it intrigued me enough to see if I could get it working on my custom STM32G4 based project. I followed the cdc two port example and reduced it down to just one cdc port as I did not want to get too complicated with it just yet. I followed a certain individuals blog post (can't remember his username but I've seen the user comment on these discussions) to ensure I had all the files I needed to set up the project. I should note that using the STM middleware as a CDC device works just fine using FreeRTOS.
What I don't understand is how to set up tinyUSB not using the "bsp/board_api.h" header file since it covers one of the callbacks for the device descriptors. I removed that include and inserted a custom string into the switch case statement. I also have defined the target in my cmake file using
add_compile_definitions(CFG_TUSB_MCU=OPT_MCU_STM32G4)
and this allows me to compile. At this point, I call these functions to set up after calling the HAL_PCD stuff to setup clocks and before initializing starting the rtos kernel. How does tinyUSB know where my USB lines are? I can't find anything regarding this in the call stack. The nucleos use UART to the STLINK-V2 so I can't really rely on similar code in that regard. The device shows up in device manager but the device descriptors are clearly not getting through. Aftertusb_init()
the code tends to call the Default_Handler() in which it says it is called in the event of an "unexpected interrupt"There's a lot of uncertainty and I can't figure out whats going on via the call stack since the TU_ASSERT() macros don't allow me to view what they do. Any pointers would be nice. I saw in
dcd_stm32_fsdev.c
that you can not use CAN simultaneously, however, my mcu supports FDCAN and I am able to use it alongside STM CDC no problem. I did try disabling it with tinyUSB to see if that would fix the issue and it did not. I also have no idea how to use theCFG_TUSB_DEBUG
feature.I am pretty noobie to USB protocol but I know lots about STM MCU's. Hopefully someone has attempted something similar, let me know!
Here is my usb_descriptors.c and tusb_config.h file:
Beta Was this translation helpful? Give feedback.
All reactions